From 9177e4240859c6801d9dd3a7612b053dd1d43250 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 20 Mar 2023 20:59:39 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7722 --- app/src/protyle/wysiwyg/remove.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index 3e23cda1d..8979aef12 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -14,6 +14,7 @@ import {setFold, zoomOut} from "../../menus/protyle"; import {preventScroll} from "../scroll/preventScroll"; import {hideElements} from "../ui/hideElements"; import {Constants} from "../../constants"; +import {scrollCenter} from "../../util/highlightById"; const removeLi = (protyle: IProtyle, blockElement: Element, range: Range) => { if (!blockElement.parentElement.previousElementSibling && blockElement.parentElement.nextElementSibling && blockElement.parentElement.nextElementSibling.classList.contains("protyle-attr")) { @@ -262,6 +263,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran } focusBlock(sideElement, undefined, false); + scrollCenter(protyle, sideElement); if (listElement) { inserts.push({ action: "update",