cordova-plugin-ionic-keyboard icon indicating copy to clipboard operation
cordova-plugin-ionic-keyboard copied to clipboard

Keyboard event onKeyBoardHide() and keyboardDidHide() creates a lag in ios in Ionic v4

Open paamrutk opened this issue 5 years ago • 3 comments

We are using ionic keyboard plugin. On closing the keyboard, we are calling

this.keyboard.onKeyboardHide().subscribe(() => { // we are shifting the entire page down to its original position });

When this onKeyboardHide event is triggered, there is a shift down and then our code where we are shifting the page to its original position gets executed. Thus, the page shifts down twice.

Same event when triggered in Android, it works smoothly without any lag.

Can anyone please help us with this.

Ionic Info: Ionic: Ionic CLI : 5.2.7 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.10.0 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0 Cordova: Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-migrate-ios-storage 0.3.6, cordova-plugin-ionic-webview 4.1.2, (and 21 other plugins) Utility: cordova-res : not installed native-run : not installed System: ios-deploy : 1.9.4 ios-sim : 8.0.2 NodeJS : v10.15.1 (/usr/local/bin/node) npm : 6.4.1 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61

paamrutk avatar Feb 28 '20 10:02 paamrutk

Same here with Ionic 5 version. Nearly 2 months without reply, I guess we have to find our own way on editing native code ourself

quangpdt avatar Apr 28 '20 07:04 quangpdt

Use window event instead of the plugin method

fromEvent(window, "keyboardWillShow").subscribe(() => {
      //action here
});

fromEvent(window, "keyboardWillHide").subscribe(() => {
     //action here
});

PocoMin avatar Jun 01 '20 06:06 PocoMin

The same is happening to me even when using window event as @PocoMin suggested =(

Thul999 avatar Jul 09 '20 22:07 Thul999