CreateJS/EaselJS — pull request #286 by bengotow (2013-03-22 16:34:16+00:00)
Title: Stage click handling does not account for x,y transforms applied to the stage

Consider this scenario. You have stage 1 and stage 2 side by side. Both have DisplayObjects which register for DblClick. In stage 2, you've set stage.x and stage.y so the coordinate space of the stage is shifted on top of stage 1's physical space. (I have a game where the two stages are showing different parts of the game world, side by side.) When you click on Stage 1, both stage 1 and stage 2 receive a double click event. When testing for a hit, the Stage class uses the event's X and Y, which have already had the transform applied. This causes the Stage 2 to think the hit occurred within it's bounds, even though the event's inBounds property is false, this value is never checked.

End result: The click event fires for both Stage 1 and Stage 2, even though the click was outside Stage 2.

Adding a simple check for inBounds in the hit testing functions fixed the issue. Tiny commit!

- Ben