I want to hide device keyboard forcefully on click event of a button for both android and ios using javaScript.
Problem is, if textbox has focus and user clicks on a button, then we need to hide device keyboard and show a custom popup.
I want to hide device keyboard forcefully on click event of a button for both android and ios using javaScript.
Problem is, if textbox has focus and user clicks on a button, then we need to hide device keyboard and show a custom popup.
If no text input has the focus then the keyboard will close itself.
You can set on your button onlick event an other event to change the focus without stopping the event (don't call event.preventDefault()
)