luci-base: ui.js: improve ui.Dropdown event handling
authorJo-Philipp Wich <jo@mein.io>
Sun, 5 Feb 2023 18:39:13 +0000 (19:39 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 5 Feb 2023 18:39:13 +0000 (19:39 +0100)
commit8db3e0e70fe0986a7c4c60f998c583e28bd0e2f0
tree891e843cdd165627777a6acf52a2b9279a5e9058
parentc13ef9406c9c2e12c28d2065b342444af5e27c0b
luci-base: ui.js: improve ui.Dropdown event handling

Improve overall event and focus handling, avoid registering a global
mouseover event listener, stop propagating escape keypress on closing
dropdown and avoid `Element.blur()` to prevent de-focusing open modals.

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