-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Flutter Web embed mode not scrolling the hosting page #157435
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
Comments
@yjbanov it would be great to get an update on this based on your previous comment |
Thanks for the report. Seeing the same behavior as reported with provided code sample on latest versions.
|
Touch is tricky. There's a similar problem with Google Maps: https://developers.google.com/maps/documentation/javascript/examples/interaction-cooperative We might be able to disable touch events when the framework says it doesn't want them, and then re-enable them after, but the current implementation of the engine (and the browser, btw) doesn't let us understand gestures (like drag). |
Wondering if anyone who has more expertise in this area has any ideas for hacks/workarounds to make this work (or at least be usable) in the meantime? Maybe using the js bridge to pass scroll events from flutter to a listener on containing page? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@adamkoch re: a workaround, thanks to chatting with claude.ai I just found that using the following CSS works around my particular issue: #flutter-element {
pointer-events: none;
} In my case the Flutter element in question is being used just for rendering and isn't meant to be interacted with via touch. That's likely not a common use case though, so YMMV. |
Thanks for the pointer (hah) @dowski. I actually got the same suggestion from Claude. This does fix the scrolling behaviour, however, it means the flutter components also stop receiving any touch events themselves. Sounds like that may work for your use-case but I still need all the flutter widgets to work as usual :( |
This comment has been minimized.
This comment has been minimized.
Hi, I know this has come up quite a few times already, but I really think it's time to take another look at the issues with iframes and scrolling—and maybe consider giving them higher priority. These aren’t just small bugs—they seriously affect monetization for Flutter web apps. For example, using Google Ads means losing key events like ad clicks or even basic scrolling in app. And third-party payment banks form just don’t work reliably. It’s tough having to explain that we’ve built a great flutter cross-platform app, but can’t monetize it properly. Hopefully this can be looked at with fresh eyes—it’s a real blocker for many of us trying to ship solid web apps. |
What's the status of this issue? Being able to interoperate Flutter with an existing website is very important in my organization, and we're encountering this scenario that limits this implementation. |
As reported in other issues, when we embed a flutter view inside another page, either using an iframe or multi-embedding view, the touch scrolling (mainly Android/iOS browsers) is not scrolling the host page
In a recent fix it was mention that this will be a follow-up but I could not find an issue for it:
Originally posted by @yjbanov in #139263 (comment)
Expected behavior:
If a user drags up/down inside a non-scrollable flutter view/widget the host page scrolls.
This is a major blocker to use Flutter view-embedding.
HTML example:
flutter_bootstrap.js
The Flutter app is then a normal flutter app with a fix size (e.g 500px height).
You can see on the attached video, how the touch in the header or footer works, but not inside the flutter-view. At the end of the video, you can also see how the mouse-wheel scroll works regardless of where it is hoovered.
flutter-web-not-scrolling-on-touch.mov
The text was updated successfully, but these errors were encountered: