Reputation: 3207
Is there a way (jquery/javascript/css) to stop iPad keyboard popping up every time we focus on an input field. Idea here is to use on screen keyboards instead (like http://mottie.github.io/Keyboard/mobile.html) as the iPad's keyboard takes almost half of the screen and this isnt required.
Upvotes: 1
Views: 482
Reputation: 2667
You could define a variable hideKeyboard
and call it whenever you need it:
var hideKeyboard = function () {
document.activeElement.blur();
$("input").blur();
};
Reference:
You could go with a plain Javascript alternative:
var hideKeyboard = function() {
document.activeElement.blur();
var inputs = document.querySelectorAll('input');
for(var i=0; i < inputs.length; i++) {
inputs[i].blur();
}
};
Upvotes: 1