Commit e85f9c2d by 杨明

fixed

1 parent 09c47d8c
......@@ -64,8 +64,7 @@ export default {
// 创建模版标签的style
this.createStyle()
// 每次光标变化的时候,保存 range
document.querySelector('.w-textarea_input').addEventListener('keyup', this.selectHandler)
document.querySelector('.w-textarea_input').addEventListener('click', this.selectHandler)
document.addEventListener('selectionchange', this.selectHandler)
},
beforeDestroy() {
// 卸载事件
......@@ -312,7 +311,6 @@ export default {
if (range && range.commonAncestorContainer.ownerDocument.activeElement.id === this.contentId) {
this.savedRange = range
}
console.log(this.savedRange)
}
},
watch: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!