Closed Bug 1903889 Opened 1 year ago Closed 1 year ago

setPointerCapture causes clicks on other elements on pointerup

Categories

(Core :: DOM: Events, defect)

Firefox 127
defect

Tracking

()

RESOLVED DUPLICATE of bug 1885232

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:

  1. https://jsfiddle.net/rghpen5y/
  2. Mousedown on the text "mousedown"
  3. Move the mouse to the button and mouseup
  4. 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.

Component: Untriaged → DOM: Events
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

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).

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1885232
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.