diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-10-01 12:43:45 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 12:43:45 +0900 |
commit | 0fbfeb883eb4ca03b9a802757138fef9a6835cdc (patch) | |
tree | d752d7594d8302f149eb6aa30485a324ab7aa883 /ext/js/language | |
parent | ea1c147730bef183855f5dc079c9a2d19e1c623e (diff) | |
parent | 0fa8d441a269b13474e6ad4108f49497d4d3abfd (diff) |
Merge branch 'master' into dependabot/github_actions/cardinalby/schema-validator-action-3.0.0
Diffstat (limited to 'ext/js/language')
-rw-r--r-- | ext/js/language/text-scanner.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/language/text-scanner.js b/ext/js/language/text-scanner.js index 6fa7a454..af5cc8fe 100644 --- a/ext/js/language/text-scanner.js +++ b/ext/js/language/text-scanner.js @@ -145,7 +145,8 @@ class TextScanner extends EventDispatcher { if (value) { this._hookEvents(); - this._userHasNotSelectedAnythingManually = window.getSelection().isCollapsed; + const selection = window.getSelection(); + this._userHasNotSelectedAnythingManually = (selection === null) ? true : selection.isCollapsed; } } |