focus the site when closing multi-level popups
This commit is contained in:
parent
834f14e808
commit
97be029dee
@ -206,9 +206,9 @@ class Popup {
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.hideChildren();
|
||||
this.hideContainer();
|
||||
this.focusParent();
|
||||
this.hideChildren();
|
||||
}
|
||||
|
||||
hideChildren() {
|
||||
@ -221,7 +221,7 @@ class Popup {
|
||||
const target = targets.shift();
|
||||
if (target.isContainerHidden()) { continue; }
|
||||
|
||||
target.hideContainer();
|
||||
target.hide();
|
||||
for (const child of target.children) {
|
||||
targets.push(child);
|
||||
}
|
||||
@ -249,10 +249,9 @@ class Popup {
|
||||
}
|
||||
|
||||
focusParent() {
|
||||
this.container.blur();
|
||||
if (this.parent && this.parent.container) {
|
||||
this.parent.container.focus();
|
||||
} else {
|
||||
this.container.blur();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user