capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

bug: keyboardWillShow event triggered after keyboard show on android

Open maxime-guyot opened this issue 6 years ago • 1 comments

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

maxime-guyot avatar Jan 21 '20 14:01 maxime-guyot

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

jcesarmobile avatar Jan 21 '20 18:01 jcesarmobile

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.

ionitron-bot[bot] avatar Jun 16 '23 16:06 ionitron-bot[bot]