Keyboard opens over picker modal


#1

I have a picker and normal text inputs in a page. When I click on the normal text input the keyboard opens and then the keyboard closes when I click the picker input, which is expected. The other way around doesn’t work though. When I first open the picker and then, while it’s still open, click the text input they keyboard opens over the picker modal. When you close the keyboard after that the picker modal is still open. How do you close the picker when the keyboard opens? I’ve tried the following logic without any success (I am using the ionic keyboard plugin in cordova)

window.addEventListener(‘keyboardWillShow’, (event) => {
app.popover.close(’.picker.modal-in’);
});


#2

Hi,
I use that plugin in a project, but add the event listener like this.

window.addEventListener('native.keyboardshow', this.keyboardShowHandler)
window.addEventListener('native.keyboardhide', this.keyboardHideHandler)

I use it to hide the toolbar when the keyboard shows and show it when de keyboard hides.


#3

Thanks! Yeah, I went that route as well, just thought that this should be standard behavior since it does it correctly by itself the other way around.