Bug 223594 - pointerdown event not fired after dragging an element
Summary: pointerdown event not fired after dragging an element
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 14
Hardware: Unspecified macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-22 12:47 PDT by Devon Govett
Modified: 2021-03-29 12:48 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devon Govett 2021-03-22 12:47:47 PDT
After dragging an element with draggable="true", the pointerdown event is not fired on another element until the user clicks twice. It seems Safari thinks the mouse is still pressed, so a pointerup event is necessary before another pointerdown event will fire.

Steps to reproduce:

1. Open https://codepen.io/devongovett/pen/poRozBz
2. Drag the element labeled "Draggable" and release it
3. Click the button labeled "Button with pointer events". Notice that the text does not turn red because the onpointerdown event is not fired. Click again and see that it does turn red.

Note that this only happens with pointer events, not mouse events. This can be seen by repeating steps 1 and 2 above, then clicking on the button labeled "Button with mouse events". The button's text turns red on the first click.

This also appears to only happen on Safari for macOS. I tested on iPadOS and it appears to work as expected.

This issue is possibly related to two other issues, which also show Safari getting into a weird state with pointer events:

1. https://bugs.webkit.org/show_bug.cgi?id=222632
2. https://bugs.webkit.org/show_bug.cgi?id=219188
Comment 1 Radar WebKit Bug Importer 2021-03-29 12:48:12 PDT
<rdar://problem/75968264>