How to disable Drag & Drop in UIWebView

In the new iOS 11 Beta 3 I notice that in UIWebView long-pressing on y link won't open the contextual menu anymore and also deep-pressing on a link (on devices with 3D-Touch) won't open the link preview on an iPhone anymore. Instead the drag operation for the link is started.


Is there a way to disable this?


If there's no way to disable the dragging of links, I guess that this is a bug. This new behavior would make it impossible to have link previews and contextual menus in UIWebViews. Especially because the UIWebView has a specil property to enable the link previews, it makes no sense to render this feature completely useless. So I guess there should be a way to disable or configure drag & drop here.


Do I miss something, or is this currently really messed up?

Replies

I just found a way to disable drag with swizzling:

https://stackoverflow.com/questions/46059925/how-to-disable-ios-11-dragging-within-the-whole-app

You can adapt this to your needs to disable it only in the cases that you want