diff options
author | Christophe <christophe.bude@uantwerpen.be> | 2021-03-31 18:34:00 +0200 |
---|---|---|
committer | Christophe <christophe.bude@uantwerpen.be> | 2021-03-31 18:34:30 +0200 |
commit | 67c49775fd4920d35613f2063b1acec9331a1370 (patch) | |
tree | d225a3e2a0d82d5465aa38a13f13d05ce74b38ee | |
parent | 724ee6c6f4ebb69a3a5200cd5d29dbe54991ad91 (diff) |
set focus to first suggestion by down arrow key
-rw-r--r-- | autocomplete.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autocomplete.js b/autocomplete.js index 90629a2..1d3be4a 100644 --- a/autocomplete.js +++ b/autocomplete.js @@ -41,6 +41,10 @@ class Autocomplete { this.dropdown.hide(); return; } + if (e.keyCode === 40) { + this.dropdown._menu.children[0]?.focus(); + return; + } }); } |