On WKWebView, when users click an menu item, menuFrame can be retrieved from the following code on iOS 13:
let menuFrame = UIMenuController.shared.menuFrame
Although UIMenuController is deprecated on iOS 16, the menu can be showed up, but menuFrame returns zero.
What's the correct way to get a menu position?
You can use UIEditMenuInteraction instead of UIMenuController. This link might be useful to you. UIMenuController is deprecated. Use UIEditMenuInteraction instead. iOS 16