summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-08-31 16:11:35 +0300
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-02 19:33:52 -0400
commite4d302e786cdb052e5ab7311ca65abb0b49d56d0 (patch)
tree407ded32ce2bda741b16ae119fbb847239064589 /ext
parent87ff5cb19bc78244faafcfcb54d8428b2ed978f6 (diff)
focus parent popup on hide instead of blurring
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/popup.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 6b757472..c91764c4 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -207,7 +207,7 @@ class Popup {
hide() {
this.hideContainer();
- this.container.blur();
+ this.focusParent();
this.hideChildren();
}
@@ -248,6 +248,14 @@ class Popup {
}
}
+ focusParent() {
+ if (this.parent && this.parent.container) {
+ this.parent.container.focus();
+ } else {
+ this.container.blur();
+ }
+ }
+
async containsPoint(point) {
if (!this.isVisible()) {
return false;