Bug 244701

Summary: dragleave and drop events are not fired if dropEffect is set to link on iOS
Product: WebKit Reporter: Devon Govett <govett>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: karlcow, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   

Description Devon Govett 2022-09-01 18:53:36 PDT
If a drag event's `dataTransfer.dropEffect` property is set to "link" in the dragover event on iOS or iPadOS, the drop operation is canceled. The drop event is never fired, and the dragleave event is not fired either, which may leave a drop target in an inconsistent state.

Reproduction steps:

1. Open https://codepen.io/devongovett/pen/ZEoEbRY on iOS or iPadOS.
2. Drag the gray square over the drop target. See that the border turns blue during the dragenter event.
3. Release the drop over the target.
4. Notice that the drag slides back to its original location rather than being accepted, and the border remains blue.

On macOS Safari, this is also broken due to a separate issue: https://bugs.webkit.org/show_bug.cgi?id=178058. However, at least when the drag is canceled the dragleave event is fired so that the drop target can reset its border.

Chrome and Firefox on macOS show the correct behavior.
Comment 1 Radar WebKit Bug Importer 2022-09-01 23:17:05 PDT
<rdar://problem/99475290>