aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}