diff options
-rw-r--r-- | ext/bg/js/search.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index a3741da0..5be71555 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -158,7 +158,13 @@ class DisplaySearch extends Display { async setContent(type, details) { this._query.blur(); - await super.setContent(type, details); + this._closePopups(); + return await super.setContent(type, details); + } + + clearContent() { + this._closePopups(); + return super.clearContent(); } // Private @@ -244,7 +250,6 @@ class DisplaySearch extends Display { this.clearContent(); } this._setTitleText(query); - yomichan.trigger('closePopups'); } catch (e) { this.onError(e); } @@ -413,4 +418,8 @@ class DisplaySearch extends Display { await onOptionsUpdated(); } + + _closePopups() { + yomichan.trigger('closePopups'); + } } |