fix errors related to selection
This commit is contained in:
parent
9e17be813d
commit
42aa58bc68
|
@ -53,8 +53,10 @@ const MentionLink = {
|
||||||
this.$router.push(link)
|
this.$router.push(link)
|
||||||
},
|
},
|
||||||
handleSelection () {
|
handleSelection () {
|
||||||
|
if (this.$refs.full) {
|
||||||
this.hasSelection = document.getSelection().containsNode(this.$refs.full, true)
|
this.hasSelection = document.getSelection().containsNode(this.$refs.full, true)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
document.addEventListener('selectionchange', this.handleSelection)
|
document.addEventListener('selectionchange', this.handleSelection)
|
||||||
|
|
Loading…
Reference in a new issue