Languages

Menu
Sites
Language
Keyboard events

Hello,

We need to know when the keyboard is shown/hiden. We managed to get the show event by listening to the input focus event that trigger the keyboard but the blur event is not fired when pressing the back button to hide the keyboard.

Is there any solution to this problem?

Responses

1 Replies
Raghu Kona

Hi,

I quickly checked on the issue and were able to get both the events. Please find below code I used 


<input id="textbox_temp" placeholder="Enter value here..." onblur="keyboardOut()"
                onfocus="keyboardIn()" type="number" />

function keyboardIn(){
    console.log("This input field has got focus.");
}

function keyboardOut(){
    console.log("This input field has lost its focus.");   
}

Regards,

Raghu Kona