Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll is not working over the Iframe with embedded flutter application

I have a flutter application which I deployed on a server. On a webpage, I embedded the flutter application Inside an Iframe.

Problem

When I scroll the page, After reaching the iframe, I cannot scroll any more. It seems Flutter application consumes scroll events and do not pass the events to the web page. And I need user interaction with the iframe as well. I have multiple widget like carousel, Poll slide, Horizontal scrolling and vertical scrolling inside the iframe. I have implemented one of my widget with jquery (not flutter) and it worked perfectly. I researched more than 2 months about this issue, I found the work around for desktop : s.addEventListener.apply(s,["wheel",q,r]) If I remove this line from main.dart.js, The scroll behavior fixes in desktop browsers But I still have problem in mobile browsers such as Safari.

Thank you in advance.

like image 507
Arman Ghaffarian Avatar asked Jan 20 '26 02:01

Arman Ghaffarian


1 Answers

Try wrapping the widget with Flexible()

like image 83
lester Avatar answered Jan 21 '26 22:01

lester



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!