Fix search page being focused when changing settings (#892)

This commit is contained in:
toasted-nutbread 2020-10-06 21:21:54 -04:00 committed by GitHub
parent cee64f91eb
commit 2f96218e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}