summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-11 18:44:53 -0400
committerGitHub <noreply@github.com>2020-09-11 18:44:53 -0400
commit6e7b9fcf99a1d7383f52f7c4d2c8e14958376211 (patch)
treed6866e055252e5b154f8a28a015a24bf06896f03
parenta5845df123f4024db686d21c4f37f38be79fb8e5 (diff)
Clear state when refreshing enabled state (#811)
-rw-r--r--ext/mixed/js/text-scanner.js7
1 files changed, 7 insertions, 0 deletions
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 {