mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 00:21:00 +08:00
This commit is contained in:
parent
98350e7768
commit
71e01a1fb5
@ -784,7 +784,19 @@ export class Wnd {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
oldWnd.switchTab(oldWnd.children[oldWnd.children.length - 1].headElement);
|
if (!oldWnd.headersElement.querySelector(".item--focus")) {
|
||||||
|
let latestHeadElement: HTMLElement;
|
||||||
|
Array.from(oldWnd.headersElement.children).forEach((headItem: HTMLElement) => {
|
||||||
|
if (!latestHeadElement) {
|
||||||
|
latestHeadElement = headItem;
|
||||||
|
} else if (headItem.getAttribute("data-activetime") > latestHeadElement.getAttribute("data-activetime")) {
|
||||||
|
latestHeadElement = headItem;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (latestHeadElement) {
|
||||||
|
oldWnd.switchTab(latestHeadElement, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tab.parent = this;
|
tab.parent = this;
|
||||||
resizeTabs();
|
resizeTabs();
|
||||||
|
Loading…
Reference in New Issue
Block a user