We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bc59cd commit 0c9c9c9Copy full SHA for 0c9c9c9
.gitignore
@@ -22,3 +22,4 @@ yarn-error.log*
22
23
# Misc
24
.ghnpmpkgtoken
25
+package-lock.json
src/UserInput.vue
@@ -181,9 +181,10 @@ export default {
181
document.addEventListener('selectionchange', () => {
182
var selection = document.getSelection()
183
if (
184
- selection.anchorNode &&
185
- selection.anchorNode != this.$refs.userInput &&
186
- selection.anchorNode.parentNode != this.$refs.userInput
+ !selection ||
+ !selection.anchorNode ||
+ (selection.anchorNode != this.$refs.userInput &&
187
+ selection.anchorNode.parentNode != this.$refs.userInput)
188
) {
189
return
190
}
0 commit comments