cjpearson / cordova-plugin-keyboard

Keyboard Plugin for Cordova
177 stars 347 forks source link

cordova.plugins.Keyboard.shrinkView(true) does not consider StatusBar.overlaysWebView(false) #100

Open mgoetz85 opened 4 years ago

mgoetz85 commented 4 years ago

I am using this keyboard plugin in a project together with the status-bar plugin (https://github.com/apache/cordova-plugin-statusbar).

I defined that the status-bar does not overlay the WebView via StatusBar.overlaysWebView(false) and it seems that this is not considered by cordova.plugins.Keyboard.shrinkView(true). When I open the keyboard, the view shrinks but it is slipping under the statusbar.

I am testing on iPhone 11 Pro with iOS 13.4

Any idea?

JoriJokinen commented 4 years ago

Same problem here.

"Solution" was to manually hide and show Statusbar after keyboard hide: window.addEventListener('keyboardDidHide', function () { StatusBar.hide(); StatusBar.show(); });

The same problem was with cordova camera-plugin.

SinGlEBW commented 1 year ago

In file CDVKeyboard.m edit comment code

if ([self settingForKey:@"StatusBarOverlaysWebView"] != nil && ![[self settingForKey:@"StatusBarOverlaysWebView"] boolValue]) { //CGRect full, remainder; //CGRectDivide(screen, &remainder, &full, statusBar.size.height, CGRectMinYEdge); //screen = full; }