From 67c49775fd4920d35613f2063b1acec9331a1370 Mon Sep 17 00:00:00 2001 From: Christophe Date: Wed, 31 Mar 2021 18:34:00 +0200 Subject: set focus to first suggestion by down arrow key --- autocomplete.js | 4 ++++ 1 file changed, 4 insertions(+) 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; + } }); } -- cgit v1.2.3