Unexpected behavior of button_up
signal when focus is changed while ui_accept
is pressed
#52578
Labels
Milestone
button_up
signal when focus is changed while ui_accept
is pressed
#52578
Godot version
3.3.3
System information
Windows 10
Issue description
I'm seeing unexpected behavior with the
button_up
signal when focus is switched between buttons while holding aui_accept
button (and then releasingui_accept
after focus has changed). If I start holdingui_accept
, abutton_down
signal is fired for the button under focus. This is as expected. However, if I use the arrow keys to navigate to a different button, and afterwards release theui_accept
button, nobutton_up
signal ever gets fired for the button I initially selected, and abutton_up
signal is instead fired for the button that I've navigated focus to.This behavior is unexpected to me for a few reasons:
button_down
andbutton_up
both fire for the original button I selected (even if I've moved the mouse around on the screen to a new location). This is the more expected result in my opinion.pressed
ortoggled
signals, which do not fire when I start pressing one button but navigate to another button before releasingui_accept
.button_up
signal to fire for a button which has never been pressed down.Instead of the current behavior, I would expect the following signal behavior when the steps described above are executed:
button_up
signals always fire on the same button from which the initialbutton_down
signal was triggered, firing once theui_accept
button has been released. In my opinion, this would be the most desirable behavior, to ensure consistency ofbutton_up
signal behavior between input types (matches current behavior when button is selected with a mouse and focus is changed).Steps to reproduce
Attached a project with minimal reproduction steps (featuring two buttons, which log to the console whenever they receive
button_up
orbutton_down
signals). In that project, if you focus the "Middle Button", hold aui_accept
button like spacebar, then navigate down to the "Bottom Button" while holding theui_accept
button, and release the accept button afterwards, the following events will fire.In my opinion, the expected output for this set of actions would instead be
Minimal reproduction project
repro.zip
The text was updated successfully, but these errors were encountered: