fix(dialog): focus and select the name entry in naming dialogs #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t3code/autofocus-folder-name-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The naming dialogs (New Folder, New Session, Rename Folder, Rename Session) all come from
Window::prompt, which never named the entry as the dialog's focus widget.AdwDialogtherefore focused the response button row on present, so creating a folder needed a click or Tab before the name could be typed.promptnow builds the dialog withAdwAlertDialog::builder().focus_widget(&entry), set at construction so it holds before the dialog is presented, and pre-selects an existing name so a rename can be overwritten by typing and kept by pressing Enter.Verified in a running instance with a temporary probe reading
AdwDialog::focus()after present: New Folder reports focus on the entry's innerGtkTextwith no selection, Rename Session the same with the whole old name selected../build-aux/ci.shand./build-aux/smoke.shboth pass.