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.

Activity

changed the title [-]Ionic hide-on-keyboard-open not working on Android 4.4[/-] [+]bug: Ionic hide-on-keyboard-open not working on Android 4.4[/+] on Feb 6, 2015
paishin

paishin commented on Feb 18, 2015

@paishin

+1

braxtondiggs

braxtondiggs commented on Feb 18, 2015

@braxtondiggs

+1

milliger

milliger commented on Feb 18, 2015

@milliger

+1
this also happens on Android 5.0.1

jackrr

jackrr commented on Feb 19, 2015

@jackrr

+1
seeing this on Moto G Android 5.0.2

changed the title [-]bug: Ionic hide-on-keyboard-open not working on Android 4.4[/-] [+]bug: Ionic hide-on-keyboard-open not working on Android[/+] on Feb 23, 2015
dbaq

dbaq commented on Feb 24, 2015

@dbaq

+1

nexus 5, android 5

Yuripetusko

Yuripetusko commented on Mar 4, 2015

@Yuripetusko

+1 here on nexus 5

Yuripetusko

Yuripetusko commented on Mar 4, 2015

@Yuripetusko

How did you do "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."

Would be nice to have temporary solution

Yuripetusko

Yuripetusko commented on Mar 6, 2015

@Yuripetusko

I used .keyboard-open {} class as a temporary solution

bradmartin

bradmartin commented on Mar 6, 2015

@bradmartin

+1

svanson

svanson commented on Mar 11, 2015

@svanson

+1

added this to the 1.0.0-rc1 milestone on Mar 11, 2015

28 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @paishin@adamdbradley@perrygovier@Yuripetusko@tlancina

      Issue actions

        bug: Ionic hide-on-keyboard-open not working on Android · Issue #3041 · ionic-team/ionic-framework