[2.0.21] Display panel "Edit message" does not focus text box automatically

Post your bugs and problems so we can fix them.
jyasutin
Burner Inserter
Burner Inserter
Posts: 17
Joined: Thu Nov 28, 2024 4:43 am
Contact:

[2.0.21] Display panel "Edit message" does not focus text box automatically

Post by jyasutin »

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).
Attachments
FACT.LOG
(8.9 KiB) Downloaded 9 times
User avatar
LCStark
Fast Inserter
Fast Inserter
Posts: 192
Joined: Thu Jan 28, 2021 5:04 pm
Contact:

Re: [2.0.21] Display panel "Edit message" does not focus text box automatically

Post by LCStark »

Yeah, I agree. I mentioned the focus issue while reporting the discard changes bypass in this topic: 119518. Those two issues may be minor, but they are impacting QoL of the display panel quite significantly.
jyasutin
Burner Inserter
Burner Inserter
Posts: 17
Joined: Thu Nov 28, 2024 4:43 am
Contact:

Re: [2.0.21] Display panel "Edit message" does not focus text box automatically

Post by jyasutin »

Thanks for the link, I searched for "focus" and your post didn't turn up. I agree both issues should be corrected -- if a dialog has a "discard changes" confirmation then it shouldn't be so trivial to completely bypass it.
Post Reply

Return to “Bug Reports”