Bug 239631

Summary: Drag and drop link in WKWebView causes UIDragInteraction soft assert on iOS 15
Product: WebKit Reporter: Liam DeBeasi <ldebeasi>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
Code reproduction
none
Video reproduction of the issue none

Description Liam DeBeasi 2022-04-21 16:17:00 PDT
Created attachment 458101 [details]
Code reproduction

Dragging and dropping a link in a webview on iOS 15 causes a UIDragInteraction soft assert to be logged. The full message reads:

[Assert] CLIENT APP ERROR - Neither the view or container of the UITargetedPreview is currently in a window. This is in violation of UIDragInteraction API contract and can cause a severe visual glich. THIS IS A CLIENT APP BUG and will soon be a hard assert. PLEASE FIX ME

Steps to reproduce:

1. Download attached code reproduction.
2. Open code reproduction in Xcode and deploy to a device running iOS 15.
3. Drag and drop the "A simple link" link. Observe that the sort assert is logged to the Xcode console.

Expected Behavior:

I would expect that no assert is logged when dragging and dropping.

Actual Behavior:

An assert is logged when dragging and dropping.

Other Information:

I tested this on a device running iOS 15.4.1.
Comment 1 Liam DeBeasi 2022-04-21 16:20:19 PDT
Created attachment 458102 [details]
Video reproduction of the issue

I have attached a video reproduction of the issue running on a simulator. I am also able to reproduce this issue on a physical device.
Comment 2 Radar WebKit Bug Importer 2022-04-28 16:17:16 PDT
<rdar://problem/92493717>