From 2f96218e33cf5b7e2077a802a42e5a8fb489e26f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 6 Oct 2020 21:21:54 -0400 Subject: Fix search page being focused when changing settings (#892) --- ext/fg/js/frontend.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext') 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(); } -- cgit v1.2.3