Bug 223594

Summary: pointerdown event not fired after dragging an element
Product: WebKit Reporter: Devon Govett <govett>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: graouts, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: macOS 10.15   

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>