[Webkit-unassigned] [Bug 244149] New: REGRESSION (iOS 16): New context menu (UIEditMenuInteraction) can't be disabled
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 19 17:15:30 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=244149
Bug ID: 244149
Summary: REGRESSION (iOS 16): New context menu
(UIEditMenuInteraction) can't be disabled
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: UI Events
Assignee: webkit-unassigned at lists.webkit.org
Reporter: krevis at figma.com
In iPadOS 16 beta 6, WKWebView shows the system edit menu (via UIEditMenuInteraction) when you control-click or right-click or two-finger-click anywhere in the web view.
We have our own handling of these events, so we don't want that menu, but there appears to be no way to disable it, or customize it.
- Tried catching the `contextmenu` event and calling `preventDefault`, as shown in the example in the MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event
Example: https://codepen.io/krevis-figma/pen/yLKejBa
This doesn't work. The handler fires but `preventDefault()` has no effect.
- Looked for relevant delegate methods, but there aren't any.
The closest thing is these WKUIDelegate methods to be called when the menu appears and disappears, but that's all:
https://bugs.webkit.org/show_bug.cgi?id=243102
Those would only let us add animations alongside the menu, anyway. They wouldn't let us disable the menu or customize its items.
- Looked for any UIKit API to globally disable the new edit menu, but there's nothing.
Could we please have a way to disable this thing? Ideally via calling `preventDefault()` on the `contextmenu` event?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220820/60cef53e/attachment.htm>
More information about the webkit-unassigned
mailing list