Page 1 of 1

Right clicking text box selects all text

Posted: Wed Jun 23, 2021 5:11 pm
by Lilly
TL;DR
When right-clicking a non-focused, single line textbox select the text contained therein.

What ?
The current behavior for non focused single line textboxes is that when you click them they get focused, which allows you to type in them. There is no difference between using the left or right mouse button.

I suggest to slightly change the right mouse click to not only focus the textbox, but also select the text contained therein.
Example
Take the text box in the combinator constant value entry dialog. Currently changing the number requires the user to click the textbox, hit backspace several times and then enter the new value.
(Or double click it, which clears it, which I did not know about)
Screenshot_20210623_184345.png
Screenshot_20210623_184345.png (22.95 KiB) Viewed 772 times
Why ?
This behavior seems to be the common behavior in modded minecraft. It allows the user to:
  • quickly change the value, as entering a new value will replace the selected text.
  • quickly copy it by hitting ctrl+c.
Note
While writing this suggestion, I learned that double clicking the text box clears it. This at least allows the player to quickly change the value. As an alternative to changing the right click action, this can be changed to selecting the text instead. This is similar to how textboxes work in other applications, were double clicking would select the word being hovered. Though double clicking is slightly slower than right clicking.

Re: Right clicking text box selects all text

Posted: Thu Jun 24, 2021 2:53 am
by ssilk
Right, this doubleclick to clear is from the UX really strange, nobody would await to delete a value in a textbox, when double click. Especially when selecting it would do the same functionality in the end. But handy, that I now know about it. :D
I looks for me like a compromise: there was no time left to select the text on focus, but double click was simple to implement. :roll: 8-)

Re: Right clicking text box selects all text

Posted: Thu Jun 24, 2021 7:52 pm
by Koub
Somehow related :
viewtopic.php?f=6&t=96237

I'm used to "select text on left click" in textfields. That's the behaviour I'd like to always have, and it differs from your suggestion. Maybe default behaviour is OS specific, and people used to Macs or UNIX/Linux will have different expectations from mine, having been mostly a Windows user the last 20ish years.