ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
192 stars 177 forks source link

iOS 12 keyboard dismissed app height is very small #87

Closed byronigoe closed 5 years ago

byronigoe commented 5 years ago

I'm using WKWebView via cordova-plugin-wkwebview-engine (I tried cordova-plugin-ionic-webview but internal links break with no console error). On iOS11 this plugin works pretty well, but notice that the app height is larger after the keyboard is dismissed than before it was opened: iOS11

On iOS 12 the initial app size is smaller (more of a gap at the bottom), and after the keyboard is opened and closed it's extremely small: iOS12

Also notice that there is no Done option in the keyboard toolbar on both iOS versions.

byronigoe commented 5 years ago

I've run some tests by forking this repo and hard-coding some different heights for the new frame. When I change the height by a little, +/- 10-20 points, the very small height is adjusted by that amount. However, when I added 100 points to the height, it extended beyond the bottom of the screen.

Also, printing the frame height to the log always reports the same value it was set to. It's just that the actual display of the frame is not respecting the values.

Is there anything else I can test to help resolve this issue?

byronigoe commented 5 years ago

I ran more tests by generating a random height each time the keyboard was dismissed, and I saw inconsistent results: Tall: 700, 802, 859, 863, 868 Short: 681, 700, 720, 759, 793, 829, 863, 866 Notice that 700 and 863 are in both lists!

Here's a sampling of results (4 short and 3 tall): iOS12random

Anyone have any idea what's going on?

byronigoe commented 5 years ago

The randomly small app size was a red herring caused by old workaround code that dynamically changed the height of the "app" div to compensate for the keyboard. I don't know why iOS 12 acted different than iOS 11, or why the results were inconsistent between successive executions.

The only remaining issue is the same one that exists in iOS 11, so I've submitted a separate issue (#89) for it.