mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
98350e7768
commit
71e01a1fb5
1 changed files with 13 additions and 1 deletions
|
|
@ -784,7 +784,19 @@ export class Wnd {
|
|||
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;
|
||||
resizeTabs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue