ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
610 stars 275 forks source link

Keyboard height includes height of system soft menu buttons at the bottom of the screen #192

Open benmcmaster opened 8 years ago

benmcmaster commented 8 years ago

Nexus 5 (Android 5.1.1)

The keyboard height includes the height of the system soft menu button bar at the bottom of the screen (back, home, menu).

The keyboard height returns 311 px. That includes the 48px soft menu bar at the bottom. The keyboard height should be 263px (in my case).

When viewed on my Samsung S6 they keyboard height is correct because that phone doesn't have the soft menu button bar at the bottom. It has hard menu buttons off-screen.

Does anyone know of a work around? Is there a way to detect the presence of soft menu buttons at the bottom in Cordova?

Using Cordova 5.1.0 for Android with Crosswalk 1.5.0 (PGB) and:

<plugin name="ionic-plugin-keyboard" source="npm" version="2.0.1" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="android-windowSoftInputMode" value="adjustPan" />

reference similar issue: https://github.com/driftyco/ionic-plugin-keyboard/issues/160

oleksiy-nesterov commented 8 years ago

confirm, same for me Nexus 7 Android 6, but seems like height includes height of status bar.

SebastianSchirmer commented 8 years ago

@benmcmaster this should be resolved now after my PR https://github.com/driftyco/ionic-plugin-keyboard/pull/199 has been merged.

benmcmaster commented 8 years ago

@leschirmeur Awesome! Thanks. Will there be a new release?

SebastianSchirmer commented 8 years ago

I guess so. Until then you just reference the commit directly

benmcmaster commented 8 years ago

Awesome! Thanks. I usually point to this plugin via npm from Phonegap Build. I'll be watching for the release. Thanks!

tlancina commented 8 years ago

Hey all, new release with the fix (2.2.1) should be out as of yesterday.