Skip to content

bug: Ionic hide-on-keyboard-open not working on Android #3041

Closed
@jvannistelrooy

Description

@jvannistelrooy

Type: bug

Platform: android 4.4 webview

On some Android phones (Android 4.4, no fullscreen app), the hide-on-keyboard-open class has no effect.

I tried to debug the problem and found that:

  • The keyboard-open class is not added to the body when the keyboard opens.

  • If I add the keyboard-open class manually, the elements are hidden.

  • If I add the class manually when the keyboard's open, and then close the keyboard, the class is correctly removed and the elements are shown.

  • It makes no difference if I open the keyboard by focussing on an input field or manually with cordova.plugins.Keyboard.show().

  • Adding my own event listener to native.keyboardshow works.

  • Mimicking the code from the ionic source to add the class works:

    window.ionic.requestAnimationFrame(function(){
    document.body.classList.add('keybord-open');
    });

I haven't been able to pinpoint the exact problem yet.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions