From a6289f4f0fcc99fb0a29eb8fc97cf0ddbbce458a Mon Sep 17 00:00:00 2001 From: jahorton Date: Tue, 21 Sep 2021 09:55:11 +0700 Subject: [PATCH] fix(web): detaches base-page touch handlers on shutdown --- web/source/dom/domManager.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/source/dom/domManager.ts b/web/source/dom/domManager.ts index a79b07599d..f0d5dc9feb 100644 --- a/web/source/dom/domManager.ts +++ b/web/source/dom/domManager.ts @@ -109,6 +109,13 @@ namespace com.keyman.dom { // On shutdown, we remove our general focus-suppression handlers as well. this.keyman.util.detachDOMEvent(document.body, 'focus', DOMManager.suppressFocusCheck, true); this.keyman.util.detachDOMEvent(document.body, 'blur', DOMManager.suppressFocusCheck, true); + + // Also, the base-page touch handlers for activation management. + if(this.touchStartActivationHandler) { + this.keyman.util.detachDOMEvent(document.body, 'touchstart', this.touchStartActivationHandler, false); + this.keyman.util.detachDOMEvent(document.body, 'touchmove', this.touchMoveActivationHandler, false); + this.keyman.util.detachDOMEvent(document.body, 'touchend', this.touchEndActivationHandler, false); + } } catch (e) { console.error("Error occurred during shutdown"); console.error(e);