-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Ionic hide-on-keyboard-open not working on Android #3041
Comments
+1 |
1 similar comment
+1 |
+1 |
+1 |
+1 nexus 5, android 5 |
+1 here on nexus 5 |
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 |
I used .keyboard-open {} class as a temporary solution |
+1 |
+1 |
+1. Same here.
|
👍 +1 |
clawish http://alturka.com/anyoption_capital 23.03.2015, 16:16, "clawish" [email protected]: +1 —Reply to this email directly or . |
+1 |
+1 |
The class is working fine for me (Nexus 5 and iPhone 5s), except it is slow to activate on Android; After the keyboard fully opens the elements hide and after the keyboard fully hides the elements show (with an additional 1s delay as well in each case) |
@jsalhani same here. It works but is slow on Android (Galaxy S3 and S5). Takes approximately 1 second to fully hide the elements. |
@jsalhani @bradmartin +1 |
Hey all,
I've updated the documentation to reflect these changes as well. |
Just wanted to say that the above suggestion by @tlancina (which is also in the docs for the keyboard plugin) will conflict with ionic's implementation of adding For example, you can do this by tapping on an input and immediately tapping on empty space to cause the keyboard to close. It may be hard to do on Android but is 100% reproducible on iOS for me. To fix it I had to replace
However, this doesn't fix the Android problem completely - I still can see the footer bar lifting up together with the keyboard and disappearing only when it's fully shown (when animations end). Edit: I measure the keyboard animation delay on my Android emulator, it takes about 200ms:
|
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
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.
The text was updated successfully, but these errors were encountered: