Created
July 24, 2015 08:57
-
-
Save linhyo/0a7c36a95fd43b6b6367 to your computer and use it in GitHub Desktop.
Hide the iOS soft keyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://uihacker.blogspot.com/2011/10/javascript-hide-ios-soft-keyboard.html | |
var hideKeyboard = function() { | |
document.activeElement.blur(); | |
var inputs = document.querySelectorAll('input'); | |
for(var i=0; i < inputs.length; i++) { | |
inputs[i].blur(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment