aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-03-21 22:29:07 +0200
committerGitHub <noreply@github.com>2020-03-21 22:29:07 +0200
commit08d38d8db2c97ff9f016a6de640f645b609088d1 (patch)
tree9060deb6f870e472c601b6cec050a2f60f62abca /ext/mixed/js/text-scanner.js
parent647769f2baae338f201690f21c4bf8983bcb10b0 (diff)
parentb616bac66ed0735c1e7ebbaf1ceba20b081f1a6f (diff)
Merge pull request #411 from siikamiika/apply-all-options-profile-change
apply all options on profile change
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();