Description
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
[-]Ionic hide-on-keyboard-open not working on Android 4.4[/-][+]bug: Ionic hide-on-keyboard-open not working on Android 4.4[/+]paishin commentedon Feb 18, 2015
+1
braxtondiggs commentedon Feb 18, 2015
+1
milliger commentedon Feb 18, 2015
+1
this also happens on Android 5.0.1
jackrr commentedon Feb 19, 2015
+1
seeing this on Moto G Android 5.0.2
[-]bug: Ionic hide-on-keyboard-open not working on Android 4.4[/-][+]bug: Ionic hide-on-keyboard-open not working on Android[/+]dbaq commentedon Feb 24, 2015
+1
nexus 5, android 5
Yuripetusko commentedon Mar 4, 2015
+1 here on nexus 5
Yuripetusko commentedon Mar 4, 2015
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 commentedon Mar 6, 2015
I used .keyboard-open {} class as a temporary solution
bradmartin commentedon Mar 6, 2015
+1
svanson commentedon Mar 11, 2015
+1
28 remaining items