ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
192 stars 177 forks source link

addEventListener not working #93

Closed Calvin1121 closed 5 years ago

Calvin1121 commented 5 years ago

I wanna get the keyboard's height to fixed the input above the keyboard; but I used these codes, they are not working~ window.addEventListener('keyboardDidShow', e => {}) and window.addEventListener('native.keyboardshow',e =>{}) ; The code works fine in Ionic3 but not working in Ionic4. (the attachment) please help me. thx~ 屏幕快照 2019-06-14 下午7 15 03

jcesarmobile commented 5 years ago

this should work

window.addEventListener('keyboardDidShow', (event) => {
    // Describe your logic which will be run each time when keyboard is about to be shown.
    console.log(event.keyboardHeight);
});

Can you provide a sample app using it that doesn't work?

jcesarmobile commented 5 years ago

Closing as I can't reproduce and no sample app was provided.