Can I control the display, that is (show / hide) the keyboard in iPad Safari through code?
I have 2 form fields; 1. Text field (for example, name) 2. Select a list / drop-down menu (user status)
My question is when the user moves the focus from the name to the state, the keyboard is still there. Why is this and how can I hide the keyboard when the focus moves to the drop-down menu?
Thank.
I ran into a very similar problem, not sure if my solution will work for you.
. e.preventDefault(), . , .
e.preventDefault()
, input.blur() . , .
input.blur()
, !
. , , ( ipad) .
<input type="hidden" id="blurInput" />
javascript :
$element = $(event.target); if($element.is('select')) { $('#blurInput').blur(); $element.focus(); }
, , ,
document.activeElement.blur(); $('input').blur();