Auto-select text in web editor input on focus#1708
Conversation
Agent-Logs-Url: https://github.com/solvespace/solvespace/sessions/4f2bf1b2-a72d-4863-8184-0207f666f020 Co-authored-by: phkahler <[email protected]>
|
Yay! (?) BTW @phkahler did you try the GTK4 port? You've wanted it for years... |
@ruevs No. My PC is still broken. BTW the GTK4 PR sitting here was prompted by someone I know. I also asked Claude to do the job about a month ago. I pasted guigtk into it, so it had no other context but our conversation. It then produced a full new version of the file. I pointed out that there were still some GTK3 calls in there so it went off again... I said menus were the biggest challenge because we create them imperatively rather than declaratively, so it need to do more work. It spit out another new version of the file. I haven't even tried to compile it yet. I have little confidence in either one. |
On web, the dimension editor input box did not pre-select existing text when opened, requiring users to manually clear it before typing — unlike the desktop experience.
Change
Added
select()call immediately afterfocus()inShowEditor(guihtml.cpp) to highlight all text when the input is shown:This invokes the browser-native
HTMLInputElement.select(), selecting all text on open and matching desktop behavior.