From d5af6adeb5e900ec200f5ab0191c6b6bcff5fcfd Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sun, 4 Sep 2016 22:45:12 +0200 Subject: improved select & deselect --- public/javascripts/bundle.js | 4 ++++ public/javascripts/main.js | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'public') 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 +}) -- cgit v1.1