webviewx
webviewx copied to clipboard
Popup menu overlapping webviewx is unclickable, even with WebViewAware
I have a PopupMenuButton where part of the menu overlaps a WebViewX (The app is Flutter web only). The menu items that are above the WebViewX cannot be clicked, and do not highlight on mouseover.
The PopupmenuButton is wrapped inside a WebViewAware widget. The individual items cannot be wrapped as they must be elements of List<PopupMenuItem>, and wrapping their child elements doesn't work.
What can I do to make the overlapping menu items clickable?
I have the same issue.
same issue
I have the same issue
I have the same issue, when I use dialog. So I should make empty WebViewX container before open dialog.
Facing same issue with PopupMenuButton. even AlertDialog is not clickable over the webview
Same issue here.
From what I've observed, each individual item that should be clickable when in front of the webview must be wrapped in a WebViewAware
. Obviously in a popup menu, this won't work.
I've tried various workarounds, like using a VisibilityDetector
to detect when something is obscuring the webview and setting the ignoreAllGestures
flag on the webview controller. But for some reason it doesn't detect when drawers and popup menus are partially obscuring the webview. It's as if the webview is somehow being "lifted" to the front (think z-index) while still being rendered behind the things that appear to be in front of it.
I find it ironic and sad that displaying an actual webpage inside a Flutter WEB app seems to be very complicated...
I was able to workaround this by:
-
placing a
pointer_interceptor
over the webview, and settingintercepting
true when it should block clicks, - AND locking
pointer_interceptor
to version0.9.1