summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/search.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 431478c9..5c0bffed 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -79,6 +79,7 @@ class DisplaySearch extends Display {
onSearchInput() {
this.updateSearchButton();
+ this.query.scrollIntoView();
}
onSearch(e) {
@@ -94,6 +95,12 @@ class DisplaySearch extends Display {
this.onSearchQueryUpdated(query, true);
}
+ onKeyDown(e) {
+ if (!super.onKeyDown(e)) {
+ this.query.focus({preventScroll: true});
+ }
+ }
+
async onSearchQueryUpdated(query, animate) {
try {
const valid = (query.length > 0);