aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-12 19:42:09 -0400
committerGitHub <noreply@github.com>2020-09-12 19:42:09 -0400
commitfcb8806717fd4b099697c1247d4441e763575684 (patch)
tree0a91f3fca0449efaf0ca09345d66be79e723fc79 /ext/mixed/js/text-scanner.js
parent9f1753a565a617cfddd861818de12eadd2a11258 (diff)
Fix location of _enabled assignment (#818)
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r--ext/mixed/js/text-scanner.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index 26c0687b..d2383af4 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -85,6 +85,8 @@ class TextScanner extends EventDispatcher {
}
setEnabled(enabled) {
+ this._enabled = enabled;
+
const value = enabled && this._isPrepared;
if (this._enabledValue === value) { return; }
@@ -95,7 +97,6 @@ class TextScanner extends EventDispatcher {
this._preventNextClick = false;
this._preventScroll = false;
- this._enabled = enabled;
this._enabledValue = value;
if (value) {