mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-12 17:55:35 +00:00
fix: safari 消息输入框焦点溢出的情况
This commit is contained in:
parent
a233c492e6
commit
ea1c2a34e2
@ -276,6 +276,8 @@ export default {
|
|||||||
pasteClean: true,
|
pasteClean: true,
|
||||||
|
|
||||||
isSpecVersion: this.checkIOSVersion(),
|
isSpecVersion: this.checkIOSVersion(),
|
||||||
|
|
||||||
|
timer: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -710,14 +712,13 @@ export default {
|
|||||||
|
|
||||||
// Mark model as touched if editor lost focus
|
// Mark model as touched if editor lost focus
|
||||||
this.quill.on('selection-change', range => {
|
this.quill.on('selection-change', range => {
|
||||||
if (!range) {
|
if (!range && document.activeElement) {
|
||||||
// 修复光标会超出的问题
|
// 修复光标会超出的问题
|
||||||
if (this.quill.hasFocus()) {
|
if (['ql-editor', 'ql-clipboard'].includes(document.activeElement.className)) {
|
||||||
this.quill.setSelection(0)
|
this.timer && clearTimeout(this.timer)
|
||||||
return
|
this.timer = setTimeout(_ => {
|
||||||
}
|
this.quill.setSelection(document.activeElement.className === 'ql-editor' ? 0 : this.quill.getLength())
|
||||||
if (document.activeElement && document.activeElement.className === 'ql-clipboard') {
|
}, 100)
|
||||||
this.quill.setSelection(this.quill.getLength())
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user