Click event inconsistent firing on nested elements
|Reported by:||whitters||Owned by:||whitters|
When you bind two nested elements' click handler the events should only fire when both the mouse down and mouse up event fires within the bounds of that element. If a mousedown originates in A and the mouseup originates in A > B then the mouseclick event should not fire on either elements.
This is is true in both Firefox 10.0.2 and Chrome 17. However, IE7-9 will fire a click event on the parent element regardless of mousedown and mouseup origins. Mousedown on A > B and mouseup on A, as well as Mousedown on A and mouseup on A > B, will result in a click event firing on A.
In all browsers a click on solely A > B will result in click events for both A > B and A as per normal event propagation.
I'm not sure how this can be distilled down to a non-interactive test since this involves non-trivial mouse input.
As I'm not familiar with what is intended to be standard behavior I submit this as behavior that should be, but is not, normalized by jQuery. http://jsfiddle.net/hSuDa/
Change History (6)
comment:5 Changed 4 years ago by dmethvin
- Resolution set to patchwelcome
- Status changed from new to closed