This commit is contained in:
Jeffrey Chen 2025-12-16 10:56:48 +08:00 committed by GitHub
commit a937f1e6e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -396,7 +396,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
@ -425,8 +424,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;
}