| Summary: | REGRESSION (iOS 16): New context menu (UIEditMenuInteraction) can't be disabled | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kurt Revis <krevis> |
| Component: | UI Events | Assignee: | Devin Rousso <hi> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | hi, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=260722 | ||
|
Description
Kurt Revis
2022-08-19 17:15:30 PDT
Even worse, showing and dismissing this menu causes the trackpad/mouse to stop sending `pointerdown` events, as in https://bugs.webkit.org/show_bug.cgi?id=236390. @Kurt Revis, I'm told that maybe overriding `-buildMenuWithBuilder:` would allow you to control this. Could you give that a try? That solution wouldn't help pure web content. In Safari on MacOS, preventDefault() stops the system context menu from appearing. That should also work on iPadOS. I can override -buildMenuWithBuilder: on a subclass of WKWebView, and it is called. But if I do nothing and don't call super, the menu still appears, with a few items (Copy, Select all, Translate, Share). We don't want the menu to appear at all. UIMenuBuilder does not provide a way to determine what items are actually in the menu so far, but I can just blindly guess, and remove the ones I think might be there. That's a pretty fragile workaround, though. (If I do succeed in removing all the items, then nothing appears, and the pointer-event bug is not triggered. So that's good, at least.) Pull request: https://github.com/WebKit/WebKit/pull/4845 Committed 255193@main (9ce57ec0f4b3): <https://commits.webkit.org/255193@main> Reviewed commits have been landed. Closing PR #4845 and removing active labels. |