mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -346,7 +346,13 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
|
||||
zoomOut({protyle: editor.editor.protyle, id: options.id});
|
||||
return true;
|
||||
}
|
||||
let nodeElement = editor.editor.protyle.wysiwyg.element.querySelector(`[data-node-id="${options.id}"]`);
|
||||
let nodeElement: Element;
|
||||
Array.from(editor.editor.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${options.id}"]`)).find(item => {
|
||||
if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed")) {
|
||||
nodeElement = item;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((!nodeElement || nodeElement?.clientHeight === 0) && options.id !== options.rootID) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: options.id,
|
||||
|
||||
Reference in New Issue
Block a user