Mouse events are completely broken for _mouseChildren=false; DisplayObjects #48

Closed
magcius opened this Issue Nov 17, 2012 · 1 comment

Projects

None yet

2 participants

Contributor
magcius commented Nov 17, 2012

I'm not sure how to describe this, other than in terms of the event flow. Imagine a Sprite with two children, and _mouseChildren = false;, and the mouse over the first child. The flow:

  1. PreVisitor visits the sprite, does a hit test, finds nothing. Visits the children.
  2. Since _mouseChildren = false;, interactiveParent is the sprite.
  3. Child 1 gets hit tested, it passes, so we queue up a mouseover event on the interactiveParent, and set the click target to it.
  4. Child 2 gets hit tested, it fails. We queue up a mouseout event on theinteractiveParent, and set the click target to null, as it was previously the hit target.

This breaks SimpleButtons, and causes them not to have the hover state. I was working on useHandCursor, and ran into this.

Contributor

Fixed in 38b2b24

@tobytailor tobytailor closed this Nov 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment