fix(layout): focus inline rename field on RENAME
Renaming a layout tab left keyboard focus on the command line, so typed characters landed there until the user clicked the tab. Give the inline rename text_input a stable id and return a focus task when the rename starts so the user types straight into the field. (issue #86) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
dc26c8128c
commit
cd4d1c2535
2 changed files with 10 additions and 0 deletions
|
|
@ -5103,6 +5103,11 @@ impl OpenCADStudio {
|
|||
if name != "Model" {
|
||||
self.layout_rename_state = Some((name.clone(), name));
|
||||
self.layout_context_menu = None;
|
||||
// Focus the inline field so the user types into it
|
||||
// directly instead of the command line (issue #86).
|
||||
return iced::widget::operation::focus(iced::widget::Id::new(
|
||||
crate::ui::statusbar::LAYOUT_RENAME_INPUT_ID,
|
||||
));
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue