luci-base: ui.js: rework dropdown focus behavior
authorJo-Philipp Wich <jo@mein.io>
Sun, 18 Feb 2024 22:25:55 +0000 (23:25 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 18 Feb 2024 23:04:16 +0000 (00:04 +0100)
commit3980c192cda6985c2e2d2608e74677cf236005db
treed256483ce8967129ea2089d04808bfa3f4e3500b
parent01e55108889563563231e111f8fe1d4bf9b1b853
luci-base: ui.js: rework dropdown focus behavior

Drop mouse following focus behavior as it interferes with custom value inputs,
rely on CSS based hover effects instead.

Also slightly improve keyboard navigation by auto-focussing the custom value
input when entering the last dropdown choice via arrow down or tab key, and
by allowing to leave the text input again with the arrow up key.

Fixes: #6903
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js