cordova-ios
cordova-ios copied to clipboard
Keyboard still visible and stuck when coming from background
Issue Type
- [X] Bug Report
- [ ] Feature Request
- [ ] Support Question
Description
Information
When a keyboard is shown and the App is brought to background and back to foreground the keyboard is still shown even if no input field is selected. Also Keyboard.hide(); does not work.
Command or Code
Select an input field to show the virtual keyboard. Bring the App to the background. Maybe with a swipe from bottom to top. Bring the App back fo foreground. Keyboard is still visible but has no functionality anymore. Keyboard.hide(); does not work. When selecting an input field no keyboard input can be done. Keyboard does not react when changing orientation or selecting a "non" input field
While selecting back and forth between input and "non"-input field there is a chance of showing a "working" keyboard. Afterwards functionality is normal again. if there is no "non" input field app need to be closed and restarted
Environment, Platform, Device
IPAD IOS 14.4.1
Version information
Cordova 10.0.0
Checklist
- [X] I searched for already existing GitHub issues about this
- [X] I updated all Cordova tooling to their most recent version
- [X] I included all the necessary information above
It seems to be a problem with newer IOS version.
Environment, Platform, Device IPHONE 6 IOS 12.5.2
Result I had no issues. Keyboard behavior was as expected.
I could also see a difference when looking at the tiles when in background. On IOS 12.5.2 i could clearly see the expanded keyboard at the bottom of the tile where on IPAD IOS 14.4.1 there was no keyboard shown in the tile.
Hi Guyz, Any update on this one??
Hi @2Prakash, after an upgrade to cordova IOS platform version 6.2 the problem was fixed. After all the upgrade from IOS 5.x to 6.2 was not super difficult, just needed one more plugin.
If the App is already in production be aware that all local data need to be migrated due to the switch to WKWebView ion IOS 6.x
In my case, my app stuck when following below steps
- Click input field which will open keyboard .
- Receive SMS message , and make sure autofill function is open and enable so we should see the authentication code from the SMS message on the top of our keyboard.
- Bring the App to the background, and bring the App back to foreground.
- Click any numbers
Then the app stuck and not able to use anymore except we restart the entire app.
In my case, my app stuck when following below steps
- Click input field which will open keyboard .
- Receive SMS message , and make sure autofill function is open and enable so we should see the authentication code from the SMS message on the top of our keyboard.
- Bring the App to the background, and bring the App back to foreground.
- Click any numbers
Then the app stuck and not able to use anymore except we restart the entire app.
![]()
Just tested and have some result.
From tag 5.1.1 to 6.0.0, commit #773 switch UIWebView into WKWebView as default engine, then the problem disappeared. So i think is just bug in UIWebView.
And just for someone here later, if you are still using Cordova ios version below 6.0.0, you can follow instructions in cordova-plugin-wkwebview-engine by adding plugin and add one or two line config. For Cordova ios version above 6.0.0, you don't have to worry about since WkWebView is the default engine start from 6.0.0.