Hides the virtual keyboard on a mobile device (iOS, Android, ...)
To use the library, install it through npm
npm install hide-virtual-keyboard
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: Browserify, Webmake or Webpack
If using a bunlder is not your thing, there is a file with UMD (Universal Module
Definition) under dist/
folder. Just reference it on your browser (drop it)
and use it.
<script src="dist/hide-virtual-keyboard.js"></script>
<script>
setTimeout(_ => {
window.hideVirtualKeyboard()
}, 250)
</script>
The module is a function that once called will blur from current focused input, hiding the virtual keyboard.
hideVirtualKeyboard()
caiogondim.com · GitHub @caiogondim · Twitter @caio_gondim