mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
ff0973029d
commit
08a8d8e8c1
1 changed files with 4 additions and 1 deletions
|
|
@ -395,6 +395,9 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScr
|
|||
focusElement.scrollIntoView();
|
||||
} else if (scrollAttr && scrollAttr.scrollTop) {
|
||||
protyle.contentElement.scrollTop = scrollAttr.scrollTop;
|
||||
} else {
|
||||
protyle.observerLoad?.disconnect();
|
||||
return;
|
||||
}
|
||||
// 加强定位
|
||||
protyle.observerLoad = new ResizeObserver(() => {
|
||||
|
|
@ -409,7 +412,7 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScr
|
|||
setTimeout(() => {
|
||||
protyle.observerLoad.disconnect();
|
||||
protyle.observer.observe(protyle.wysiwyg.element);
|
||||
}, 1000 * 16);
|
||||
}, 1000 * 3);
|
||||
|
||||
if (focusElement.isSameNode(protyle.wysiwyg.element.firstElementChild)) {
|
||||
protyle.observerLoad.disconnect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue