How to disable scroll actions for embedded Flutter web app?
- Build your project with
flutter build web
- Search and delete
Warning: It's not recommend to edit build files, but this is the only way I have found to disable scroll actions in the iFrame. When you delete the Event Listener you are not able to scroll in the iFrame and this workaround works only for desktop.
See https://github.com/flutter/flutter/issues/78216 for more information.
Admin 11 months
First question on SO - please be gentle.
I have a simple flutter web app that I'm embedding in an existing webpage. The app is hosted on firebase, and I'm using an iFrame on the parent page hosted separately to display the flutter app. Image below.
The issue that I'm having is that whenever the pointer is over the iframe, the flutter app absorbs the scroll/wheel events, even if the app contains no scrollable content. I've tried just about everything I can research, from js scripts to iframe attributes to css. Nothing works. jQuery isn't accepted by the parent page either.
Here's the code I've tried on the parent web page - the console log events aren't being triggered (when using chrome dev tools at least) so I haven't attempted to pass the wheel event on to the parent as yet.