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);
|
this.queryParser.setText(interpretedQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async setContent(type, details) {
|
||||||
|
this.query.blur();
|
||||||
|
await super.setContent(type, details);
|
||||||
|
}
|
||||||
|
|
||||||
setIntroVisible(visible, animate) {
|
setIntroVisible(visible, animate) {
|
||||||
if (this.introVisible === visible) {
|
if (this.introVisible === visible) {
|
||||||
return;
|
return;
|
||||||
|
@ -257,6 +257,8 @@ class Frontend {
|
|||||||
const definitions = await apiKanjiFind(searchText, optionsContext);
|
const definitions = await apiKanjiFind(searchText, optionsContext);
|
||||||
if (definitions.length === 0) { return null; }
|
if (definitions.length === 0) { return null; }
|
||||||
|
|
||||||
|
textSource.setEndOffset(1);
|
||||||
|
|
||||||
return {definitions, type: 'kanji'};
|
return {definitions, type: 'kanji'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user