You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs state that inputs are processed in the order of _input() > _gui_input() > _shortcut_input() > _unhandled_input() > _unhandled_key_input(). However, SubViewportContainer overrides this ordering by propagating all input (key) events at input(). This triggers all input event functions of its child nodes before all other Control nodes, completely messing up the ordering.
This is a continuation of #58334
although this merge fixed the problem when events contain a position, it does not affect key-press events.
I believe, that the problem you describe is related to #79235 and got fixed in current master by #79248.
Can you please verify, if your problem is still apparent in Godot V4.2 dev3?
Also please be aware that this order _input() > _gui_input() > _shortcut_input() > _unhandled_input() > _unhandled_key_input() is guaranteed only within a single Viewport.
In your description, you are utilizing different Viewports:
root viewport with LineEdit
SubViewport with Node2D
So the above order is not guaranteed when comparing LineEdit and Node2D.
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Windows 10
Issue description
The docs state that inputs are processed in the order of
_input()
>_gui_input()
>_shortcut_input()
>_unhandled_input()
>_unhandled_key_input()
. However,SubViewportContainer
overrides this ordering by propagating all input (key) events atinput()
. This triggers all input event functions of its child nodes before all other Control nodes, completely messing up the ordering.This is a continuation of #58334
although this merge fixed the problem when events contain a
position
, it does not affect key-press events.(other related issues are #48401 #48368 and #39666)
@Sauermann
Steps to reproduce
LineEdit
to apply focusCorrect ordering is:
1 2 3 4 5
_input() > _gui_input() > _shortcut_input() > _unhandled_input() > _unhandled_key_input()
But instead, the ordering is 1, 3, 4, 5, 2
SceneTree
LineEdit.gd
Player.gd
Minimal reproduction project
SubViewportContainer key input bug reproduction project.zip
The text was updated successfully, but these errors were encountered: