react-native-textinput

React-navigation focus on input blurs immediately when going back to previous screen

这一生的挚爱 提交于 2020-06-27 03:41:24
问题 I want to focus on a textinput when I navigate to a new screen. This works when I add a screen to the stack, but not when I go back in the stack. Instead, the input focuses for a second and blurs immediately. Here is what I get: Screen A is first in the stack and input blurs immediately Screen B is added to the stack and works as intended Any idea what is causing this? FYI, I have the same issue if I use autoFocus. Here is the whole (pretty straight forward) code: import { NavigationContainer

Keyboard dismisses while typing TextInput in nested functional component React Native

核能气质少年 提交于 2020-06-16 04:41:50
问题 I have this strange issue, keyboard keeps closing while typing when TextInput is placed inside Child Functional Component. This issue does not exist if TextInput is placed directly under Parent Component. Here is my code const SignInScreenC = props => { // define Hook states here const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [isEmailEmpty,setIsEmailEmpty] = useState(false); const [isEmailValid,setIsEmailValid] = useState(true); const

Keyboard dismisses while typing TextInput in nested functional component React Native

拥有回忆 提交于 2020-06-16 04:41:27
问题 I have this strange issue, keyboard keeps closing while typing when TextInput is placed inside Child Functional Component. This issue does not exist if TextInput is placed directly under Parent Component. Here is my code const SignInScreenC = props => { // define Hook states here const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [isEmailEmpty,setIsEmailEmpty] = useState(false); const [isEmailValid,setIsEmailValid] = useState(true); const

Override/Disable iOS Smart Punctuation in TextInput

≡放荡痞女 提交于 2020-03-19 19:42:27
问题 React Native 0.59.9 with device running iOS 11, and Smart Punctuation enabled. This iOS feature automatically converts entered text into more visually-pleasing notations. Examples: double hyphen -- gets autoconverted to an emdash — (unicode 8212) quotation mark " gets autoconverted to a curly quote “ (unicode 8220) etc. Disabling Smart Punctuation (via Settings > General > Keyboard) is unfortunately not an option. I render a basic TextInput component almost exactly as per the RN docs, with