Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
bug: Input focus will not trigger keyboard on Android #3115
Comments
I think it was working in the past, at least since this was merged #2719, but doesn't seem to work anymore. But testing in your app, if you first call focus and then use |
Thank you for your response. I was convinced that I didn't get it working for type="number", but just tried again and it does in fact seem to work. We'll be using that as a workaround for now. |
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
On input focus the soft keyboard is not shown unless user has interacted with the webview before the focus event.
Expected Behavior
I would expect the soft keyboard to show on input focus. That is how it works on iOS.
On iOS it seems this behavior can be controlled with the KeyboardDisplayRequiresUserAction configuration. But I haven't been able to figure out how to do something similar for Android.
I know I can trigger the keyboard manually using the Capacitor keyboard plugin, but that way the input type (here number) will no be respected and the regular keyboard is shown.
Is this is expected behavior and if so is there anything we can do to override this?
Code Reproduction
Sample application for repro here:
https://github.com/peterlindholm/capacitor-keyboard
Other Technical Details
npm --version
output: 6.14.5node --version
output: v12.12.0