[2.0.21] Display panel "Edit message" does not focus text box automatically
Posted: Fri Nov 29, 2024 9:09 pm
Some (most?) dialog boxes that exist exclusively for text input automatically focus the text box when opened.
What I did:
1. Place a constant combinator.
2. Left click on the constant combinator and then click the "Add description" button.
What happens:
* The resulting "Edit description" dialog automatically focuses the text box, as expected.
However a display panel's label dialog does not focus the text box.
What I did next:
1. Place a display panel next to the constant combinator and connect the two with a red circuit.
2. Left click on the display panel; due to the circuit connection you should see one message entry with "(No label)".
3. Click the pencil icon next to "(No label)".
What I expect:
* The dialog that opens should automatically focus the text box.
What happens:
* The resulting "Edit Message" dialog does NOT focus the text box automatically and if I start typing, I am likely to trigger other actions.
(Pedantic nitpick: "Edit Message" dialog title is proper-case but most other dialog titles are not.)
This may seem minor but a number of times now I've started typing text intended for a label on a display panel only to trigger actions in the world (which among other things may immediately close the Display panel dialog). Ironically the display panel is one of the few dialogs that confirms if you want to discard changes when you hit Esc, but I keep bypassing that check by typing, for example, "Left" (Shift-L immediately brings up logistic networks and closes the display panel dialog).
What I did:
1. Place a constant combinator.
2. Left click on the constant combinator and then click the "Add description" button.
What happens:
* The resulting "Edit description" dialog automatically focuses the text box, as expected.
However a display panel's label dialog does not focus the text box.
What I did next:
1. Place a display panel next to the constant combinator and connect the two with a red circuit.
2. Left click on the display panel; due to the circuit connection you should see one message entry with "(No label)".
3. Click the pencil icon next to "(No label)".
What I expect:
* The dialog that opens should automatically focus the text box.
What happens:
* The resulting "Edit Message" dialog does NOT focus the text box automatically and if I start typing, I am likely to trigger other actions.
(Pedantic nitpick: "Edit Message" dialog title is proper-case but most other dialog titles are not.)
This may seem minor but a number of times now I've started typing text intended for a label on a display panel only to trigger actions in the world (which among other things may immediately close the Display panel dialog). Ironically the display panel is one of the few dialogs that confirms if you want to discard changes when you hit Esc, but I keep bypassing that check by typing, for example, "Left" (Shift-L immediately brings up logistic networks and closes the display panel dialog).