-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgets are not interactable when stacked on top of a WebViewWidget in web. #123343
Comments
@willov |
I was under the impression that Still, it is not possible to interact with the stacked widgets in the web application (when using the I have uploaded the full small example to this repository: https://github.com/willov/flutter_webview_issue_example |
Thanks for the update. I verified this behavior on web and on mobile and confirmed that the reported behavior occurs on web, ie, tapping on stacked widgets like back button or eye icon don't perform any action, as they are placed over the webview. stable, master flutter doctor -v
|
@ditman Is this a duplicate? |
@willov, @stuartmorgan, @darshankawar: I think this is solved by wrapping the widgets that are stacked on top of the HtmlElementView in a (In the future we want to promote the package to the framework, and automate its usage in several places, but for now it's a separate thing). @willov let me know if this solves your issue! |
@stuartmorgan this is a known quirk of the web framework when overlaying Flutter content on top of HtmlElementView widgets. I'll remove the "package" labels, because this will happen with any package that uses an HtmlElementView to render, like: video player, google maps, (possibly) link widget, webview_web, etc... (I'm not sure if we keep an issue open for this since we released |
@ditman wrapping the widgets in the pointer_interceptor package does indeed solve the issue in the web application. Perhaps obviously, I had to include a leading icon with an onPressed action to get the back button to be intractable. Perhaps mentioning this pointer_interceptor package on the webview_flutter page would be a good idea? Either way, big thanks for pointing out the solution! |
For now making it a documentation issue, but we should consider moving pointer interceptor into the framework, so that:
|
It appears that stacking widget on top of a WebViewWidget does not work in the web version.
I have also tested this on Android, and there stacking widgets on top of WebViewWidget does appear to work.
I also tried using another WebView package web_browser, but the same behaviour occurs.
Steps to Reproduce
webview_flutter_web (0.2.2+1)webview_flutterflutter run
on the code sample using Chrome (see "Code sample" section below)Expected results:
Interactivity with the widgets, such as returning when using the back button, or switching the visibility symbol to a visibility_off symbol.
Actual results:
No interactivity. The back button sometimes show the "hover over" effect.
Code sample
Logs
The verbose log is too long to attach in the text so it is attached as a separate file.
run_verbose.txt
The text was updated successfully, but these errors were encountered: