diff options
author | Kuuuube <61125188+Kuuuube@users.noreply.github.com> | 2024-05-27 10:49:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 14:49:54 +0000 |
commit | e1c3613da0189c9c234d59d4474cfc3f958af79d (patch) | |
tree | 3b72278703896450ac94b288bb775bbd72fc54a2 /ext | |
parent | 623e4aa2b79e3da7e4b0bf8c071538641f96712a (diff) |
Clear mouse position on popup close (#997)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/js/app/frontend.js | 6 | ||||
-rw-r--r-- | ext/js/language/text-scanner.js | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js index cc71311d..c856ae0f 100644 --- a/ext/js/app/frontend.js +++ b/ext/js/app/frontend.js @@ -349,6 +349,7 @@ export class Frontend { */ _onClosePopups() { this._clearSelection(true); + this._clearMousePosition(); } /** @@ -438,6 +439,11 @@ export class Frontend { this._textScanner.clearSelection(); } + /** */ + _clearMousePosition() { + this._textScanner.clearMousePosition(); + } + /** * @param {number} delay * @param {boolean} restart diff --git a/ext/js/language/text-scanner.js b/ext/js/language/text-scanner.js index 17809300..0d8e49b1 100644 --- a/ext/js/language/text-scanner.js +++ b/ext/js/language/text-scanner.js @@ -364,6 +364,11 @@ export class TextScanner extends EventDispatcher { } } + /** */ + clearMousePosition() { + this._lastMouseMove = null; + } + /** * @returns {?import('text-source').TextSource} */ |