diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 346d55fc710..f095be3d2d7 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -389,7 +389,6 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: return; } if (operation.action === "unfoldHeading") { - const scrollTop = protyle.contentElement.scrollTop; protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach(item => { item.removeAttribute("fold"); // undo 会走 transaction @@ -418,8 +417,6 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: highlightRender(protyle.wysiwyg.element); avRender(protyle.wysiwyg.element, protyle); blockRender(protyle, protyle.wysiwyg.element); - protyle.contentElement.scrollTop = scrollTop; - protyle.scroll.lastScrollTop = scrollTop; } return; }