From 73f92cd16126497abb4ff56ad37da50bbcf57cbc Mon Sep 17 00:00:00 2001 From: BetaHuhn Date: Tue, 23 Nov 2021 18:27:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Prevent=20help=20reset=20from=20?= =?UTF-8?q?getting=20stuck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/plugins/directives.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/plugins/directives.js b/client/plugins/directives.js index 12a5b4a..4315198 100644 --- a/client/plugins/directives.js +++ b/client/plugins/directives.js @@ -25,7 +25,7 @@ Vue.directive('longpress', { const timeout = 1500 // Define funtion handlers - // Create timeout ( run function after 1s ) + // Create timeout const start = (e) => { if (e.type === 'click' && e.button !== 0) { return @@ -60,7 +60,9 @@ Vue.directive('longpress', { // Cancel timeouts if this events happen el.addEventListener('click', cancel) el.addEventListener('mouseout', cancel) + el.addEventListener('mouseup', cancel) el.addEventListener('touchend', cancel) + el.addEventListener('touchleave', cancel) el.addEventListener('touchcancel', cancel) } }) \ No newline at end of file