focusFirstInput (Modal) doesn't work on Android
See original GitHub issueI was able to make it working on iOS adding <preference name="KeyboardDisplayRequiresUserAction" value="false" />
in the config.xml
.
I don’t how to do on Android, I’ve tried to use this cordova plugin (https://github.com/phonostar/PhoneGap-SoftKeyboard.git
) but it doesn’t work. Suggestions?
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
TextInput Doesn't Get Focus Inside a Modal - React Native ...
I have 4 TextInputs in a Modal, the first TextInput get the focus without any problem, but the rest don't get focus.
Read more >[Android - Modal ] TextInput doesn't get focus · Issue #7031
The problem is that the top TouchableOpacity fires on the first click, even when the field is focused, but the bottom one requires...
Read more >focus - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The :focus CSS pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user ......
Read more >Control focus with tabindex - web.dev
Try pressing the Tab key to navigate through your site. Are you able to reach all the interactive controls on the page? If...
Read more >How to Set Focus on Input Field or Textarea Inside a Bootstrap ...
Answer: Use the jQuery .focus() method. You can simply use the jQuery .focus() method to set the focus on the first input box...
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 Free
Top 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
together with the IonicKeyboard Plugin I found a working solution on iOS 7+ and Android 4.4+ by using a directive
in HTML
and this config.xml:
See the full example here:
We’re using beta4 in the app
In order to get the keyboard to display on focus, you can use the following directive:
for example:
I’m guessing the default implementation does not include the auto-display of the keyboard on focus for fear of hiding content unintentionally.