ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
191 stars 177 forks source link

Fix content overflow below navigation bar, and black bar above the keyboard when it is shown #156

Open ebhsgit opened 3 years ago

ebhsgit commented 3 years ago

Fix for

117

132

Both of these issues are due to incorrect calculation of the frameLayoutParams.height value

Child content getWindowVisibleDisplayFrame() calculates the area which the user can view the content.

The top position is below the status bar. The bottom position is above the navigation bar, keyboard and other UI element from the bottom.

If app is in full screen mode, then the actual usable height is the distance from the top of the screen to the bottom of the returned Rect.

So, if app is in full screen, return the bottom position of the rect. Otherwise use the height of the visible area.

prtuson commented 2 years ago

I have tried this fix on a Miui 11 running android 11. It works fine if either the navigation bar or blackbar are being used. If the blackbar is suppressed, i.e. hidden, then the bottom position is missing still.