Vanessa 2024-09-16 11:36:28 +08:00
parent 22ffd923d3
commit b9adce4e92

View file

@ -163,7 +163,10 @@ export const openFile = async (options: IOpenFileOptions) => {
if (hasClosestByClassName(item.element, "layout__wnd--active")) {
activeEditor = item;
}
editor = item;
if (!editor || item.headElement.getAttribute("data-activetime") > editor.headElement.getAttribute("data-activetime")) {
// https://github.com/siyuan-note/siyuan/issues/11981#issuecomment-2351939812
editor = item;
}
}
if (activeEditor) {
return true;