aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-06 21:21:54 -0400
committerGitHub <noreply@github.com>2020-10-06 21:21:54 -0400
commit2f96218e33cf5b7e2077a802a42e5a8fb489e26f (patch)
tree4c04bcadc30d09e41c8a14289437f954fea72218
parentcee64f91eb821f128ca4d0a6e62eac97a7d88180 (diff)
Fix search page being focused when changing settings (#892)
-rw-r--r--ext/fg/js/frontend.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 95c9eb1b..97f73075 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -107,7 +107,7 @@ class Frontend {
yomichan.on('optionsUpdated', this.updateOptions.bind(this));
yomichan.on('zoomChanged', this._onZoomChanged.bind(this));
- yomichan.on('closePopups', this._onApiClosePopup.bind(this));
+ yomichan.on('closePopups', this._onClosePopups.bind(this));
chrome.runtime.onMessage.addListener(this._onRuntimeMessage.bind(this));
this._textScanner.on('clearSelection', this._onClearSelection.bind(this));
@@ -226,6 +226,10 @@ class Frontend {
this._updateContentScale();
}
+ _onClosePopups() {
+ this._clearSelection(true);
+ }
+
_onVisualViewportScroll() {
this._updatePopupPosition();
}