fix(web): detaches base-page touch handlers on shutdown

This commit is contained in:
jahorton 2021-09-21 09:55:11 +07:00
parent b452092765
commit a6289f4f0f

View file

@ -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);