mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
bb0776bd38
commit
ccbcaeb1fd
1 changed files with 12 additions and 6 deletions
|
|
@ -681,12 +681,18 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
if (item.headElement) {
|
if (item.headElement) {
|
||||||
if (item.headElement.classList.contains("item--focus")) {
|
if (item.headElement.classList.contains("item--focus")) {
|
||||||
let currentIndex = index + 1;
|
let latestHeadElement: HTMLElement
|
||||||
if (index === this.children.length - 1) {
|
Array.from(item.headElement.parentElement.children).forEach((headItem: HTMLElement) => {
|
||||||
currentIndex = index - 1;
|
if (!headItem.isSameNode(item.headElement)) {
|
||||||
|
if (!latestHeadElement) {
|
||||||
|
latestHeadElement = headItem;
|
||||||
|
} else if (headItem.getAttribute("data-activetime") > latestHeadElement.getAttribute("data-activetime")) {
|
||||||
|
latestHeadElement = headItem;
|
||||||
}
|
}
|
||||||
if (this.children[currentIndex] && !closeAll) {
|
}
|
||||||
this.switchTab(this.children[currentIndex].headElement, true);
|
})
|
||||||
|
if (latestHeadElement && !closeAll) {
|
||||||
|
this.switchTab(latestHeadElement, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (animate) {
|
if (animate) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue