Open betalars opened 2 hours ago
Requesting the Acessability Label for this Issue.
I suggest having to press the Enter key to confirm starting to edit a text input field when you navigate into it using arrow keys. Pressing enter when the text is selected should bring focus back to the element and not the edited text.
This would mean the element has kind of a surface and a deep focus mode, where on the surface you just select the element and on the deep mode you edit the text.
Update: it is no longer a focus trap when the focus_mode is set to all.
However I fail to see how you are then supposed to enter numbers.
:bulb:
So the LineEdit inside spinbox automatically gets focus when the SpinBox focus mode is set to none. That is really counter-intuitive imho.
If anyone stumbles across this issue and wants a workaround here is what I did to remedy:
_input
and check for focus to write a custom handle.As I prevent the underlying line edit from grabbing focus in the first place trough directional navigation, it is no longer acting as a focus trap.
Resolving this for Line Edits on your own is going to be a bit more difficult tho. You may ned to nest it into a parent control node that handles focus, have not looked into it yet, as I currently do not need that feature for my game.
Oh I need to investigate a flaw in my own logic, but don't currently have a controller at hand to test it.
This issue does not need further investigation right now until i double checked something.
Tested versions
v4.3.stable.custom_build [41b17e249]
System information
KDE Plasma 6.1.2 - Wayland - on nixos
Issue description
When a SpinBox is part of a UI and is being navigated to with directional keys, it functions as a focus trap You can escape it using
ui_focus_next
andui_focus_previous
, but to my knowledge it is inescapable on a controller. The player cannot leave this element using a game-pad without losing focus entirely. They cannot navigate past this element at all on a gamepad.Steps to reproduce
Minimal reproduction project (MRP)
n/a