From e4d302e786cdb052e5ab7311ca65abb0b49d56d0 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sat, 31 Aug 2019 16:11:35 +0300 Subject: [PATCH] focus parent popup on hide instead of blurring --- ext/fg/js/popup.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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;