webviewx icon indicating copy to clipboard operation
webviewx copied to clipboard

Popup menu overlapping webviewx is unclickable, even with WebViewAware

Open PGScully opened this issue 2 years ago • 7 comments

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?

PGScully avatar Feb 11 '22 03:02 PGScully

I have the same issue.

MOhammed-Ram avatar Mar 16 '22 10:03 MOhammed-Ram

same issue

NavidHosseini avatar Jun 06 '22 12:06 NavidHosseini

I have the same issue

Ayush-gupta-josh avatar Jun 14 '22 05:06 Ayush-gupta-josh

I have the same issue, when I use dialog. So I should make empty WebViewX container before open dialog.

bungabear avatar Jun 20 '22 09:06 bungabear

Facing same issue with PopupMenuButton. even AlertDialog is not clickable over the webview

paritosh1edison avatar Jun 29 '22 11:06 paritosh1edison

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...

magnuswikhog avatar Jul 01 '22 20:07 magnuswikhog

I was able to workaround this by:

PGScully avatar Aug 08 '22 01:08 PGScully