setPointerCapture causes click event
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: David.Gausmann, Unassigned)
Details
Attachments
(1 file)
|
1.12 KB,
text/html
|
Details |
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.
Comment 1•4 years ago
|
||
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.
Comment 2•4 years ago
|
||
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
Updated•4 years ago
|
Comment 3•3 years ago
|
||
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.
Comment 4•2 years ago
|
||
Looks there's a resolution for this issue, see https://github.com/w3c/pointerevents/issues/357 and https://github.com/w3c/pointerevents/issues/356
Updated•2 years ago
|
Description
•