diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-08 13:18:54 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-08 13:18:54 +0200 |
commit | 3d917a7710a8c54b1f4457e059fe9e380ed108b7 (patch) | |
tree | 85413003407fe3ed313dffee9c83a41f89aeec78 /public/javascripts/main.js | |
parent | 89f7dafc89dc4705f6c8f1787e157b67f92e77ae (diff) |
fixed iOS keyboard not going away
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r-- | public/javascripts/main.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 98a54bd..d0f3280 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -101,7 +101,10 @@ inputNode.addEventListener('click', function () { }) inputNode.addEventListener('blur', function () { - inputNode.selectionStart = inputNode.selectionEnd = -1 + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) + if (!isSafari) { + inputNode.selectionStart = inputNode.selectionEnd = -1 + } }) searchNode.addEventListener('blur', function (e) { |