Closed Bug 1694436 Opened 4 years ago Closed 2 years ago

setPointerCapture causes click event

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Firefox 85
defect

Tracking

()

RESOLVED DUPLICATE of bug 1755752

People

(Reporter: David.Gausmann, Unassigned)

Details

Attachments

(1 file)

Attached file pointereventsclick.htm

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

I am using the fancy onpointerdown and onpointerdown with setPointerCapture/releasePointerCapture to allow the user to resize a column of a table.
In my example file you can pseudo-drag a box instead.

Actual results:

When the user releases the mouse button over something with a click event, that click event is triggered.

Expected results:

The click event should not be triggered, unless the mouse down was on the same element.
In Chrome this works as expected.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Chrome fires click somewhere higher up in the DOM tree, right?

This sounds like a case which is still a bit undefined
https://github.com/w3c/pointerevents/issues/75

Severity: -- → S3
Depends on: 1556240
Priority: -- → P3

Just got hit by this, and exactly the same case, making columns resizable. Look like the spec issues aren't fixed yet.

If someone need a workaround, I added a DIV over the entire document on pointerdown and remove it after pointerup. The DIV stop the propagation of the click event.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1755752
Resolution: --- → DUPLICATE
No longer depends on: 1556240
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: