diff options
Diffstat (limited to 'app/src/web/ts/click_a.ts')
-rw-r--r-- | app/src/web/ts/click_a.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/web/ts/click_a.ts b/app/src/web/ts/click_a.ts index 8d1d545b..1fd63683 100644 --- a/app/src/web/ts/click_a.ts +++ b/app/src/web/ts/click_a.ts @@ -91,14 +91,16 @@ prevented = true; }; + const _frostAllowClick = () => { + prevented = false; + clearTimeout(clickTimeout) + }; + document.addEventListener('click', _frostAClick, true); let clickTimeout: number | undefined = undefined; document.addEventListener('touchstart', () => { clickTimeout = setTimeout(_frostPreventClick, 400); }, true); - document.addEventListener('touchend', () => { - prevented = false; - clearTimeout(clickTimeout) - }, true); + document.addEventListener('touchend', _frostAllowClick, true); }).call(undefined); |