aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 167e82c0..3292cac4 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -128,7 +128,7 @@ class Frontend {
}
this.popupTimerClear();
- this.searchClear();
+ this.searchClear(true);
}
onMouseOut(e) {
@@ -138,7 +138,7 @@ class Frontend {
onFrameMessage(e) {
const handlers = {
popupClose: () => {
- this.searchClear();
+ this.searchClear(true);
},
selectionCopy: () => {
@@ -153,7 +153,7 @@ class Frontend {
}
onResize() {
- this.searchClear();
+ this.searchClear(true);
}
onClick(e) {
@@ -265,7 +265,7 @@ class Frontend {
async updateOptions() {
this.options = await apiOptionsGet(this.getOptionsContext());
if (!this.options.enable) {
- this.searchClear();
+ this.searchClear(false);
}
}
@@ -320,7 +320,7 @@ class Frontend {
textSource.cleanup();
}
if (hideResults && this.options.scanning.autoHideResults) {
- this.searchClear();
+ this.searchClear(true);
}
this.pendingLookup = false;
@@ -333,7 +333,7 @@ class Frontend {
const searchText = textSource.text();
if (searchText.length === 0) {
- return;
+ return false;
}
const {definitions, length} = await apiTermsFind(searchText, this.getOptionsContext());
@@ -366,7 +366,7 @@ class Frontend {
const searchText = textSource.text();
if (searchText.length === 0) {
- return;
+ return false;
}
const definitions = await apiKanjiFind(searchText, this.getOptionsContext());
@@ -392,8 +392,8 @@ class Frontend {
return true;
}
- searchClear() {
- this.popup.hide();
+ searchClear(changeFocus) {
+ this.popup.hide(changeFocus);
this.popup.clearAutoPlayTimer();
if (this.options.scanning.selectText && this.textSourceLast) {