diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-05-07 01:49:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 01:49:42 +0300 |
commit | a88501ff1014a70635a9c109939ea53b3046dd9c (patch) | |
tree | f4055c4fcf87b5001065e3ad855289e316902223 /ext/fg/js | |
parent | 253dcf8b38c6ef2bec1a524db70e30ac7b1817c5 (diff) |
Text selection fixes (#511)
* select matched text in Frontend.findKanji
* blur search query input when setting content
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/frontend.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index b2cb0cd8..7ba0de2e 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -257,6 +257,8 @@ class Frontend { const definitions = await apiKanjiFind(searchText, optionsContext); if (definitions.length === 0) { return null; } + textSource.setEndOffset(1); + return {definitions, type: 'kanji'}; } |