mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
♻️ 删除 iframe 下方的块再删除 iframe,内容为空
This commit is contained in:
parent
d490305558
commit
d70f02e5b7
1 changed files with 1 additions and 14 deletions
|
|
@ -481,20 +481,7 @@ export const focusSideBlock = (updateElement: Element) => {
|
|||
if (!sideBlockElement) {
|
||||
sideBlockElement = updateElement;
|
||||
}
|
||||
const cursorElement = getContenteditableElement(sideBlockElement);
|
||||
if (cursorElement) {
|
||||
const range = getEditorRange(cursorElement);
|
||||
range.selectNodeContents(cursorElement);
|
||||
range.collapse(collapse);
|
||||
focusByRange(range);
|
||||
} else {
|
||||
const mathElement = updateElement.querySelector(".katex-display");
|
||||
if (mathElement) {
|
||||
const range = mathElement.nextElementSibling.ownerDocument.createRange();
|
||||
range.setStart(mathElement.nextElementSibling.firstChild, 0);
|
||||
focusByRange(range);
|
||||
}
|
||||
}
|
||||
focusBlock(sideBlockElement);
|
||||
return;
|
||||
}
|
||||
const range = getEditorRange(updateElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue