🐛 Auto-focus search input when shortcuts panel opens

Fixes #8481
This commit is contained in:
Mihai
2026-02-26 14:10:46 +01:00
committed by Andrey Antukh
parent c9d9e493e7
commit 1ce295f5e5

View File

@@ -483,9 +483,6 @@
(reset! open-sections [[1]])
(reset! filter-term "")))]
(mf/with-effect []
(dom/focus! (dom/get-element "shortcut-search")))
[:div {:class (dm/str class " " (stl/css :shortcuts))}
[:> panel-title* {:class (stl/css :shortcuts-title)
:text (tr "shortcuts.title")
@@ -496,7 +493,8 @@
:on-clear on-search-clear-click
:value @filter-term
:placeholder (tr "shortcuts.title")
:icon-id i/search}]]
:icon-id i/search
:auto-focus true}]]
(if match-any?
[:div {:class (stl/css :shortcuts-list)}