The Scenario
Layer 1: Parent Window (this page)
Layer 2: Iframe (non-Flutter host app)
Layer 3: Flutter (embedded via hostElement)
+------------------ Parent window (this page) -------------------+
| |
| +-------- iframe (non-Flutter host app) ------------------+ |
| | | |
| | [ Header content - non-Flutter ] | |
| | | |
| | +--- Flutter embedded via hostElement ---+ | |
| | | | | |
| | | (Flutter ListView with items) | | |
| | | | | |
| | +----------------------------------------+ | |
| | | |
| | [ More HTML content below Flutter ] | |
| | [ This content should scroll when Flutter is done ] | |
| | | |
| +---------------------------------------------------------+ |
| |
+-----------------------------------------------------------------+
✅ Expected Behavior
- User scrolls over Flutter component
- Flutter handles scroll (items move)
- Flutter reaches boundary
- Iframe's document scrolls next
- Iframe reaches boundary
- Parent window scrolls last
❌ PR 179703 Behavior
- User scrolls over Flutter component
- Flutter handles scroll (items move)
- Flutter reaches boundary
scrollParentWindow()is called- Parent window scrolls immediately!
- Iframe content is skipped!
Live Demo
The iframe below contains a non-Flutter app with Flutter embedded as a component. Try scrolling the Flutter content to its boundary.
📦 IFRAME - Non-Flutter app with embedded Flutter component
Why This Matters
When scrollParentWindow() is called from Flutter (inside the iframe),
it scrolls window.parent - which is this page, not the iframe's document.
The non-Flutter content in the iframe is completely bypassed, breaking the expected scroll flow.