bug: keyboardWillShow event triggered after keyboard show on android
Bug Report
the event "keyboardWillShow" on Keyboard plugin triggered after keyboard is show on android
Capacitor Version
npx cap doctor output:
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 1.4.0
@capacitor/core: 1.4.0
@capacitor/android: 1.4.0
@capacitor/ios: 1.4.0
Installed Dependencies:
@capacitor/cli 1.4.0
@capacitor/core 1.4.0
@capacitor/ios 1.4.0
@capacitor/android 1.4.0
[success] Android looking great! 👌
Found 5 Capacitor plugins for ios:
cordova-plugin-badge (0.8.8)
cordova-plugin-camera (4.1.0)
cordova-plugin-email (1.2.7)
cordova-plugin-mediapicker-dmcsdk (2.4.7)
cordova-plugin-simple-image-resizer (0.2.0)
[success] iOS looking great! 👌
Affected Platform(s)
- [x] Android
- [ ] iOS
- [ ] Electron
- [ ] Web
Current Behavior
On android 8 with Samsung A8, the event keyboardWillShow triggered after the keyboard show.
Expected Behavior
the event should be triggered before the keyboard show
Sample Code or Sample Application Repo
// same effect on all listeners
Keyboard.addListener("keyboardWillShow", () => alert('keyboardWillShow'));
window.addEventListener("keyboardWillShow", () => alert('keyboardWillShow'));
Reproduction Steps
Focus to input text
Other Technical Details
npm --version output: 6.11.2
node --version output: v11.2.0
pod --version output (iOS issues only):
Other Information
This is really and Android limitation, it's not possible to know when the keyboard is going to be shown, so both keyboardWillShow and keyboardDidShow are fired at the same time.
Leaving open for documenting it
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 the plugin, please create a new issue and ensure the template is fully filled out.