Open skicson opened 8 years ago
I'm seeing the same thing happen from time to time in V1. The event only fires about 6/10 times on average for me. It is causing major pain for us.
You can use something like this
Observable.fromEvent(window, 'native.keyboardshow')
Observable.fromEvent(window, 'native.keyboardhide')
To create an observable for window event. I don't think those events were meant to be used like that.
Or you could use ionic native Keyboard methods.
import { Keyboard } from 'ionic-native';
// Both return are Observable<any>
Keyboard.onKeyboardShow();
Keyboard.onKeyboardHide();
How do it work with ionic 1? Keyboard.onKeyboardShow() doesn't fire...
Are you running the app in full screen mode?
I've found that the events don't fire correctly in full screen mode. On Fri, 17 Mar 2017 at 12:05 PM louisdoe notifications@github.com wrote:
How do it work with ionic 1? Keyboard.onKeyboardShow() doesn't fire...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/driftyco/ionic-plugin-keyboard/issues/230#issuecomment-287314703, or mute the thread https://github.com/notifications/unsubscribe-auth/ANBc47YSLdvaVx6BCxkx4wFZ9jAldm1Dks5rmlrcgaJpZM4Ke5s4 .
No I am not running in full screen mode, at least i don't think so. How do i check ?
In angular, the syntax to get a window event is something like:
However, replacing "resize" with native.keyboardshow or native.keyboardhide does not work (the callback does not get called). Through trial and error, it appears the '.' in the event name is causing an issue.
If the event names are renamed without the '.', like 'native-keyboardshow' and 'native-keyboardhide', they work as expected.
This may very well be an angular issue; Just noting it for other users....