This commit is contained in:
Vanessa 2023-12-15 19:53:18 +08:00
parent ff0973029d
commit 08a8d8e8c1

View file

@ -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();