mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
cc447681c0
commit
39b20dc224
1 changed files with 7 additions and 1 deletions
|
|
@ -346,7 +346,13 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
|
||||||
zoomOut({protyle: editor.editor.protyle, id: options.id});
|
zoomOut({protyle: editor.editor.protyle, id: options.id});
|
||||||
return true;
|
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) {
|
if ((!nodeElement || nodeElement?.clientHeight === 0) && options.id !== options.rootID) {
|
||||||
fetchPost("/api/filetree/getDoc", {
|
fetchPost("/api/filetree/getDoc", {
|
||||||
id: options.id,
|
id: options.id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue