summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-08-31 18:01:38 +0300
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-02 19:33:52 -0400
commit97be029deee4ec34ad2e90081af15d573dede0cd (patch)
tree9bc8362651b3b0b1114a854f70ae648cc8fa006f /ext/fg
parent834f14e808526da958b26accd0d18056a7f4415c (diff)
focus the site when closing multi-level popups
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/popup.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index c91764c4..61a5e4d0 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -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();
}
}