diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-04 22:45:12 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-04 22:45:12 +0200 |
commit | d5af6adeb5e900ec200f5ab0191c6b6bcff5fcfd (patch) | |
tree | 65afe8ca41ffd098fd1fe582c7c202ba3c9f66ae /public | |
parent | fd7262bebcd6aff7e3ad229bd9e737816a2b23bc (diff) |
improved select & deselect
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/bundle.js | 4 | ||||
-rw-r--r-- | public/javascripts/main.js | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/public/javascripts/bundle.js b/public/javascripts/bundle.js index e0760b5..938a501 100644 --- a/public/javascripts/bundle.js +++ b/public/javascripts/bundle.js @@ -96965,4 +96965,8 @@ inputNode.addEventListener('click', function () { inputNode.select() }) +inputNode.addEventListener('blur', function () { + inputNode.selectionStart = inputNode.selectionEnd = -1 +}) + },{"./getURLOfUser":369,"./getUsers":370,"fuzzy":232}]},{},[371]); diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 123a2f1..c492ace 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -67,3 +67,7 @@ getUsers().then(function (users) { inputNode.addEventListener('click', function () { inputNode.select() }) + +inputNode.addEventListener('blur', function () { + inputNode.selectionStart = inputNode.selectionEnd = -1 +}) |