From 6e7b9fcf99a1d7383f52f7c4d2c8e14958376211 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 11 Sep 2020 18:44:53 -0400 Subject: Clear state when refreshing enabled state (#811) --- ext/mixed/js/text-scanner.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext') diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js index a789c84c..dedd29b7 100644 --- a/ext/mixed/js/text-scanner.js +++ b/ext/mixed/js/text-scanner.js @@ -85,7 +85,14 @@ class TextScanner extends EventDispatcher { setEnabled(enabled) { this._eventListeners.removeAllEventListeners(); + this._primaryTouchIdentifier = null; + this._preventNextContextMenu = false; + this._preventNextMouseDown = false; + this._preventNextClick = false; + this._preventScroll = false; + this._enabled = enabled; + if (this._enabled && this._isPrepared) { this._hookEvents(); } else { -- cgit v1.2.3