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 Events | Assignee: | 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 | ||
Devon Govett
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/99475290>