diff options
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/frontend.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 8b2df1b0..d789c4f0 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -251,12 +251,12 @@ class Frontend { } } - _onSearched({type, definitions, sentence, inputInfo: {cause, empty}, textSource, optionsContext, detail: {documentTitle}, error}) { + _onSearched({type, definitions, sentence, inputInfo: {eventType, passive, detail}, textSource, optionsContext, detail: {documentTitle}, error}) { const scanningOptions = this._options.scanning; if (error !== null) { if (yomichan.isExtensionUnloaded) { - if (textSource !== null && !empty) { + if (textSource !== null && !passive) { this._showExtensionUnloaded(textSource); } } else { @@ -264,7 +264,11 @@ class Frontend { } } if (type !== null) { this._stopClearSelectionDelayed(); - const focus = (cause === 'mouseMove'); + let focus = (eventType === 'mouseMove'); + if (isObject(detail)) { + const focus2 = detail.focus; + if (typeof focus2 === 'boolean') { focus = focus2; } + } this._showContent(textSource, focus, definitions, type, sentence, documentTitle, optionsContext); } else { if (scanningOptions.autoHideResults) { |