mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
This commit is contained in:
parent
0ab814f7e4
commit
9edf50f9c4
1 changed files with 6 additions and 1 deletions
|
|
@ -352,8 +352,13 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
let oldFocusIndex = 0;
|
let oldFocusIndex = 0;
|
||||||
this.children.forEach((item, index) => {
|
this.children.forEach((item, index) => {
|
||||||
if (item.headElement?.classList.contains("item--focus")) {
|
if (item.headElement && item.headElement.classList.contains("item--focus")) {
|
||||||
oldFocusIndex = index;
|
oldFocusIndex = index;
|
||||||
|
let nextElement = item.headElement.nextElementSibling;
|
||||||
|
while (nextElement && nextElement.classList.contains("item--pin")) {
|
||||||
|
oldFocusIndex++;
|
||||||
|
nextElement = nextElement.nextElementSibling;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!keepCursor) {
|
if (!keepCursor) {
|
||||||
item.headElement?.classList.remove("item--focus");
|
item.headElement?.classList.remove("item--focus");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue