diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-11 18:44:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 18:44:53 -0400 |
commit | 6e7b9fcf99a1d7383f52f7c4d2c8e14958376211 (patch) | |
tree | d6866e055252e5b154f8a28a015a24bf06896f03 | |
parent | a5845df123f4024db686d21c4f37f38be79fb8e5 (diff) |
Clear state when refreshing enabled state (#811)
-rw-r--r-- | ext/mixed/js/text-scanner.js | 7 |
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 { |