summaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2020-04-10 09:38:07 -0700
committerAlex Yatskov <alex@foosoft.net>2020-04-10 09:38:07 -0700
commit3ed49205f2af076e3c5b4fe371d8a0a420845581 (patch)
treeab0c0fd9638aaa6a842bc4f17e73754ca7d26bd9 /ext/mixed/js/text-scanner.js
parentb77e2afe3a8ef9e96a53dd8ca97d8b913941244b (diff)
parent281023095a9fb7f7aca1df8dc0e3f902e78dc16b (diff)
Merge branch 'master' into testing
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r--ext/mixed/js/text-scanner.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index a08e09fb..b8156c01 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -23,13 +23,15 @@
*/
class TextScanner {
- constructor(node, ignoreNodes, ignoreElements, ignorePoints) {
+ constructor(node, ignoreElements, ignorePoints) {
this.node = node;
- this.ignoreNodes = (Array.isArray(ignoreNodes) && ignoreNodes.length > 0 ? ignoreNodes.join(',') : null);
this.ignoreElements = ignoreElements;
this.ignorePoints = ignorePoints;
+ this.ignoreNodes = null;
+
this.scanTimerPromise = null;
+ this.causeCurrent = null;
this.textSourceCurrent = null;
this.pendingLookup = false;
this.options = null;
@@ -298,6 +300,7 @@ class TextScanner {
this.pendingLookup = true;
const result = await this.onSearchSource(textSource, cause);
if (result !== null) {
+ this.causeCurrent = cause;
this.textSourceCurrent = textSource;
if (this.options.scanning.selectText) {
textSource.select();