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;
|
||||
this.children.forEach((item, index) => {
|
||||
if (item.headElement?.classList.contains("item--focus")) {
|
||||
if (item.headElement && item.headElement.classList.contains("item--focus")) {
|
||||
oldFocusIndex = index;
|
||||
let nextElement = item.headElement.nextElementSibling;
|
||||
while (nextElement && nextElement.classList.contains("item--pin")) {
|
||||
oldFocusIndex++;
|
||||
nextElement = nextElement.nextElementSibling;
|
||||
}
|
||||
}
|
||||
if (!keepCursor) {
|
||||
item.headElement?.classList.remove("item--focus");
|
||||
|
|
Loading…
Add table
Reference in a new issue