From fe73dbd784979e50f78611155b2549eee0849005 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sat, 7 Mar 2026 23:31:07 +0800 Subject: [PATCH] :art: Prevent scroll jump on heading expansion (#16307) fix https://github.com/siyuan-note/siyuan/issues/15715 --- app/src/protyle/wysiwyg/transaction.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 10e0bc65b..faa4e0561 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -399,7 +399,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 @@ -428,8 +427,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; }