Text input submit button not working on first click
See original GitHub issueEnvironment
react: 16.8.3 => 16.8.3 react-native: 0.59.8 => 0.59.8
Platforms
Both in Android and iOS
Versions
- Android: 9
- iOS: 13.3
- react-native-modal: 11.4.0
- react-native: 0.59.8
- react: 16.8.3
Description
Have a text input and submit and close button in the modal. The keyboard is autofocus and with the keyboard is opened and try to close or submit the inputs, the buttons are not working on the first click. On first click the keyboard is closed and need to click on the button second time to submit.
Reproducible Demo
Step to reproduce:
- A text input, close and submit button in modal.
- The keyboard is auto-focused when the modal appears.
- Try to close the modal, by clicking the close button with the keyboard opened.
- On the first click the keyboard closed and need to tap again the close button to close the modal.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:18
- Comments:26 (1 by maintainers)
Top Results From Across the Web
submit button is not working on first click - Stack Overflow
You kept click function inside Submit function that's why you needed twice click. Button type is submit that's why first click triggering submit ......
Read more ><input type="submit"> - HTML: HyperText Markup Language
A simple submit button ... This renders like so: Try entering some text into the text field, and then submitting the form. Upon...
Read more >When a Click is Not Just a Click | CSS-Tricks
First things first. The <button> element, as described by MDN, is simply: The HTML element represents a clickable button, used to submit ......
Read more >Submit button works under IE, but not under Chrome
Everything goes well as in tutorial, but finally clicking the Submit button does nothing in Chrome. It pass for the first-time after Chrome...
Read more >JavaScript input type=submit is not working? - Tutorialspoint
To make it work, you can use onclick with input type = “submit”. Example. Following is the code − <!DOCTYPE html> <html lang="en">...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is your content wrapped in a
<ScrollView />
? If so, trykeyboardShouldPersistTaps={'handled'}
in<ScrollView>
props.keyboardShouldPersistTaps={'handled'}
works for me, but in my case, I need to put these props into both theScrollView
andKeyboardAwareScrollView
.My code more or less looks like this: