UI: dialogs open with their first text field focused and selected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pravdomil
2026-10-11 23:13:53 +02:00
co-authored by Claude Opus 5.5
parent 67434e9038
commit 8e1d742a9d
8 changed files with 62 additions and 3 deletions
@@ -420,6 +420,7 @@ pub fn show(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) {
// ---- search + command list + editor
ui.horizontal(|ui| {
let r = ui.add(egui::TextEdit::singleline(&mut st.query).hint_text(tr("Search commands or shortcuts")).desired_width(360.0));
crate::widgets::focus_on_open(ui.ctx(), &r, &st.query);
app.auto.add("shortcuts.search", r.rect, "Search");
});
ui.add_space(4.0);