Bug 202287
Summary: | pointerdown events are not fired for clicks that follow a drag&drop. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Aurélien Roy <aurelien_roy> |
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | 7raivis, alexreardon, b.houdusse, blesa, bumblebee.zizka, graouts, graouts, hi, jc.dafko, lvegerano422, rsnow, seva, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Mac | ||
OS: | macOS 10.14 |
Aurélien Roy
Bug confirmed on stable releases of :
- Safari 13.0.0 / Mojave 10.14.6
- Safari 13.0.1 / Mojave 10.14.6
Overview :
"pointerdown" events are not fired for clicks that follow a drag&drop.
How to reproduce :
- Add an event listener to a draggable DOM element for "pointerdown" event.
- If you click on it, the event will fre.
- Drag the element and release it.
- The next time you will click on it, "pointerdown" event won't fire.
- Following clicks will work again until the next drag&drop.
Codepen : https://codepen.io/Tlokuus/pen/JjPVrLy
This causes some commonly used JS libraries do not work propertly, for instance :
https://github.com/SortableJS/Sortable/issues/1571
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/55768441>
Antoine Quint
The "mousedown" and "click" events are fired as expected, odd!
Antoine Quint
We're actually dispatching a "pointermove" event instead of a "pointerdown" event because we believe the pointer is still pressed in PointerCaptureController::pointerEventForMouseEvent():
// We're already active and getting another mousedown, this means that we should dispatch
// a pointermove event and let the button state show the newly depressed button.
if (type == names.mousedownEvent && capturingData.pointerIsPressed)
return PointerEvent::create(names.pointermoveEvent, button, mouseEvent);
We must not clear the pointerIsPressed state during drag-and-drop.
lvegerano422
Anyone knows the status of this bug? This is very alive in Safari 13.0.5
Binyamin
This bug is breaking compatibility to different libraries, for example https://github.com/SortableJS/Sortable/issues/1571
George Zizka
This issue still persist even in Safari 14 Preview
Rob Snow
Any status? this is still present in 15.4 and is causing us grief in our library react-aria
JC Franco
I am able to reproduce with v17.2.1 (19617.1.17.11.12).
Tomas Blesa
The bug is still there in 17.6 (19618.3.11.11.5)
alexreardon
I raised a (duplicate) bug for this issue, not realising a bug report already existed: https://bugs.webkit.org/show_bug.cgi?id=279749
Ahmad Saleem
*** Bug 279749 has been marked as a duplicate of this bug. ***