skol-pro / ion-digit-keyboard-v2

A digital keyboard plugin to use in Ionic 2 applications.
MIT License
94 stars 40 forks source link

confirm button in toolbar can't stopPropagation #4

Open menglol opened 7 years ago

menglol commented 7 years ago

code in ts file: hideKeyboard(event?) { console.log(event) event.stopPropagation(); event.preventDefault(); IonDigitKeyboard.hide(); }

when i click the the confirm button the keyboard hide succesfully but it cause the event in content behind the keyboard

toolbar above the togglebutton ,everytime i colse the keyboard the toggle button event was called

can you help me resolve the problem ? ths

skol-pro commented 7 years ago

Hi menglol, I'm not sure to understand, you have a button on a toolbar with a button, when you click the button it also triggers an event on elements behind the button, that's it ?

menglol commented 7 years ago

yes when keyboard show on my page ,the button in the toolbar is right on my togglebutton , when i click the button in toolbar , the togglebutton is called also

skol-pro commented 7 years ago

Hum ok weird, since there is stopPropagation() and preventDefault()... Hard for me to spot the problem without any code actually. But so, actually when you click it it hides the keyboard and show it again, right ?

menglol commented 7 years ago

keyboard events works ok, i didn't find solution either,so i hide the right button now, i will try other way and ths for your keyboard

skol-pro commented 7 years ago

Yeah ok, really weird, I'll try that when I have a moment ! Thanks for the feedback at least !! :-)