This commit is contained in:
Vanessa 2024-12-13 19:52:05 +08:00
parent aa36b95bdb
commit 45bd7be977
2 changed files with 7 additions and 1 deletions

View file

@ -18,6 +18,9 @@ const forwardStack: IBackStack[] = [];
const focusStack = (backStack: IBackStack) => {
const protyle = getCurrentEditor().protyle;
// 前进后快速后退会导致滚动错位 https://ld246.com/article/1734018624070
protyle.observerLoad.disconnect();
window.siyuan.storage[Constants.LOCAL_DOCINFO] = {
id: backStack.id,
};
@ -95,6 +98,10 @@ const focusStack = (backStack: IBackStack) => {
setReadonlyByConfig(protyle, true);
}
protyle.contentElement.scrollTop = backStack.scrollTop;
// 等待 av 等加载 https://ld246.com/article/1734018624070
setTimeout(() => {
protyle.contentElement.scrollTop = backStack.scrollTop;
}, Constants.TIMEOUT_LOAD);
});
};