Text selection fixes (#511)
* select matched text in Frontend.findKanji * blur search query input when setting content
This commit is contained in:
parent
253dcf8b38
commit
a88501ff10
@ -301,6 +301,11 @@ class DisplaySearch extends Display {
|
||||
this.queryParser.setText(interpretedQuery);
|
||||
}
|
||||
|
||||
async setContent(type, details) {
|
||||
this.query.blur();
|
||||
await super.setContent(type, details);
|
||||
}
|
||||
|
||||
setIntroVisible(visible, animate) {
|
||||
if (this.introVisible === visible) {
|
||||
return;
|
||||
|
@ -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'};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user