setPointerCapture causes clicks on other elements on pointerup
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: caleb, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Steps to reproduce:
Quick repro:
- https://jsfiddle.net/rghpen5y/
- Mousedown on the text "mousedown"
- Move the mouse to the button and mouseup
- The click event fires, and an alert shows up
In more detail: register pointerdown on an element, and in the callback, call setPointerCapture on the element with the event's pointerId as the argument. When you mousedown in the element area, mouse out, and mouseup, the thing under the mouse shouldn't get a click event since it wasn't mousedowned on.
Actual results:
The click event fired, even though the physical button down didn't happen on that element.
Expected results:
The click event should not fire. It doesn't fire in any other browser, and it didn't used to in Firefox either.
Thank you for the report, that's what I'm working on bug 1885232 even though the bug summary is not search friendly (so, this bug summary will help other developers to look for the bug state).
Description
•