From 550715001dec111c0e0afab2b58c89b7ec775b8a Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Thu, 1 Nov 2018 12:46:30 -0400 Subject: [PATCH] Adjusting button hold handler --- src/lib/components/Keyboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/components/Keyboard.js b/src/lib/components/Keyboard.js index cbf0bc61..64bc69c8 100644 --- a/src/lib/components/Keyboard.js +++ b/src/lib/components/Keyboard.js @@ -217,6 +217,12 @@ class SimpleKeyboard { */ this.isMouseHold = true; + if(this.holdInteractionTimeout) + clearTimeout(this.holdInteractionTimeout); + + if(this.holdTimeout) + clearTimeout(this.holdTimeout); + /** * @type {object} Time to wait until a key hold is detected */