MouseEnter/Exit events not correctly passed on from children to parent script since Godot 4.2 dev3 #81909
Description
Godot version
4.2 dev3 and 4.2 dev4
System information
Windows 10
Issue description
With the following Control Node hierarchy:
the TextureRect
Node (godot icon) blocks the mouse_entered / mouse_exited
signals in the script of the ParentWithScript
Node (the white area). The TextureRect
uses its default mouse_filter
of Pass
. When using the mouse_filter
Ignore
, the signals are triggered correctly on the parent.
I went back the official versions to see when the behavior started and it seems to have started with 4.2 dev3.
In 4.2 dev2 the behavior is still a bit weird, but it has been like that for a long time (tested with 4.1.1) : when moving the mouse from "over the parent" (the white area in the MRP) directly to "over the child" (the godot icon), the mouse_exited
signal gets triggered first and then directly the mouse_entered
again. But at least the last signal that gets triggered is mouse_entered
(important for custom tooltips!).
Another quick observation (that is not in the MRP): I added a tooltip to the ParentWithScript
node and that gets correctly shown when hovering over the TextureRect
child node! So it seems to only affect the signals.
Steps to reproduce
- Open the minimal reproduction project in Godot 4.2 dev3 or dev4
- Run it
- Observe that
entered
gets printed when hovering over the white area (the parent), butexited
gets called as soon as the mouse moves over the godot icon (the child)
Minimal reproduction project
Metadata
Assignees
Type
Projects
Status
No status