ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
610 stars 274 forks source link

Blackberry10 Support - EventListeners are not working #155

Open beatgrabe opened 8 years ago

beatgrabe commented 8 years ago

I want to use the ionic-plugin-keyboard plugin on my blackberry10 platform target. I had to figure that nothing happens in respect to the event listener below.

window.addEventListener('native.keyboardshow', keyboardShowHandler);
function keyboardShowHandler(e){
    alert('Keyboard height is: ' + e.keyboardHeight);
}

window.addEventListener('native.keyboardhide', keyboardHideHandler);
function keyboardHideHandler(e){
    alert('Goodnight, sweet prince');
}

I found a way to use the native webworks events (see code below) to solve it for me, but the question still remains open to me why it does not work since this plugin is pretending to support this functionality on blackberry10.

My workaround:

document.addEventListener( "keyboardOpened", keyboardShowHandler );
document.addEventListener( "keyboardClosed", keyboardHideHandler );