aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-08 19:40:15 -0400
committerGitHub <noreply@github.com>2020-09-08 19:40:15 -0400
commitb687870a55eae43a71ea3adc41be0ab341a8721f (patch)
tree55b5046b6c2f9513edf09307c05cc50d3468ae67 /ext/mixed/js
parentab4dbacc4c36d6373e22f758eefdb7514dc7cdb9 (diff)
Delay hide option (#774)
* Add hideDelay option * Add _clearSelection * Use hideDelay * Prevent repeated delayed selection clears * Fix popup hide timer being cleared when the cursor is moved into the frame
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/text-scanner.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index 2410f2b7..f3e99577 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -144,6 +144,10 @@ class TextScanner extends EventDispatcher {
return clonedTextSource.text();
}
+ hasSelection() {
+ return (this._textSourceCurrent !== null);
+ }
+
clearSelection(passive) {
if (!this._canClearSelection) { return; }
if (this._textSourceCurrent !== null) {