Focus text input fields on right click
jinks opened this issue · 4 comments
Issue type:
- ➕ Feature request
Short description:
Pretty much what the title says. All fields that allow text input (filter, true/false, settings) should clear on right click. This is consistent with many other GUIs that have text input fields (RS, AE, JEI, NEI, etc.).
I'd submit a PR, but I'm pretty much swamped for the rest of the month. So, if you don't get around to it before August I might look into it myself :)
Right now, when I right-click in a text box it selects the text, but does not move the input focus. So I have to left-click -> right-click -> backspace -> type.
I'm not sure the accidental clicking is as much of an issue as you think since a lot of other mods already function this way, so players should be used to it.
Not sure about this, as this might be annoying when people right-click by accident.
I've had this request in the past as well, and as a compromise, I made right-click select the whole text box, so you just have to press backspace to delete the whole thing.
Sounds good to me. Also, MC does overwrite when you just type ahead with marked text, so the backspace we both just assumed is strictly not necessary.
With right-click setting text focus and marking the whole field your proposed behavior is thus definitely better than the "default".
Hmm, that should be simplifiable to left-click -> right-click -> backspace -> type. I'll look into that.
since a lot of other mods already function this way
It's not because a lot of people do something in a certain way, that it is necessarily a good way ;-) I for instance get annoyed when my long texts suddenly are deleted when accidentally misclicking.
As a compromise, I'll look into making right-click also set the right input focus.