So I encountered a weird bug in the input system:
Consider the following:
input.on(Input.EventType.MOUSE_DOWN, this.onMouseDown, this);
input.on(Input.EventType.MOUSE_MOVE, this.onMouseMove, this);
This works correctly, both onMouseDown
and onMouseMove
get called.
Now consider this:
this.node.on(Input.EventType.MOUSE_DOWN, this.onMouseDown, this);
input.on(Input.EventType.MOUSE_MOVE, this.onMouseMove, this);
onMouseDown
now only gets called when the node is clicked on, which is also the correct behaviour. However onMouseMove
only gets called when the cursor is moving outside the node boundaries. This is wrong and node.on shouldn’t block input.on.
Anyone knows a way to fix this or get around it?