-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When embedded in policyengine-app-v2 at /:countryId/model, the iframe has a fixed height. The parent page's footer sits immediately below the iframe, taking up ~1/3 of the screen instead of appearing only when the user scrolls to the bottom of the content.
Solution
When the ?embed query parameter is present, post the root element's scrollHeight to the parent window via postMessage. Use a ResizeObserver to send updated heights when content changes.
Message format:
{ type: 'policyengine-model-height', height: number }The parent app (policyengine-app-v2) will listen for this message and resize the iframe accordingly.
Related
- policyengine-app-v2#697
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels