From d142fcd9a71a7ab68307b653f879befe20d81978 Mon Sep 17 00:00:00 2001 From: IndrekV Date: Thu, 12 Sep 2019 11:24:02 +0300 Subject: [PATCH] fix(popup): Fix cursor jump when focusing duration --- src/scripts/popup.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/scripts/popup.js b/src/scripts/popup.js index 8fb21424f..09807ebd9 100644 --- a/src/scripts/popup.js +++ b/src/scripts/popup.js @@ -421,6 +421,16 @@ window.PopUp = { .addEventListener('focus', (e) => { PopUp.$tagAutocomplete.openDropdown(); }); + document + .querySelector('#toggl-button-duration') + .addEventListener('focus', (e) => { + PopUp.stopDurationInput(); + }); + document + .querySelector('#toggl-button-duration') + .addEventListener('blur', (e) => { + PopUp.updateDurationInput(true); + }); PopUp.$projectAutocomplete.onChange(function (selected) { const project = TogglButton.findProjectByPid(selected.pid);