mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
This commit is contained in:
parent
356a29eb72
commit
afead500fb
@ -18,6 +18,7 @@ import {hideElements} from "../ui/hideElements";
|
||||
import {Constants} from "../../constants";
|
||||
import {scrollCenter} from "../../util/highlightById";
|
||||
import {isMobile} from "../../util/functions";
|
||||
import {mathRender} from "../render/mathRender";
|
||||
|
||||
export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Range, type: "Delete" | "Backspace" | "remove") => {
|
||||
// 删除后,防止滚动条滚动后调用 get 请求,因为返回的请求已查找不到内容块了
|
||||
@ -409,6 +410,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
|
||||
range.insertNode(leftNodes);
|
||||
// 图片前删除到上一个文字块时,图片前有 zwsp
|
||||
previousLastElement.outerHTML = protyle.lute.SpinBlockDOM(previousLastElement.outerHTML);
|
||||
mathRender(getPreviousBlock(removeElement) as HTMLElement);
|
||||
removeElement.remove();
|
||||
// extractContents 内容过多时需要进行滚动条重置,否则位置会错位
|
||||
protyle.contentElement.scrollTop = scroll;
|
||||
|
Loading…
Reference in New Issue
Block a user