diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-08 19:40:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 19:40:15 -0400 |
commit | b687870a55eae43a71ea3adc41be0ab341a8721f (patch) | |
tree | 55b5046b6c2f9513edf09307c05cc50d3468ae67 /ext/mixed/js | |
parent | ab4dbacc4c36d6373e22f758eefdb7514dc7cdb9 (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.js | 4 |
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) { |