100% height on body or html element breaks viewport height calculation

Created on 3 September 2025, 15 days ago

Overview

In useSyncIframeHeightToContent we make use of iframeHTML.offsetHeight to set the height of the viewport.
If the css for the page has either of html or body set to height: 100% or block-size: 100% this doesn't work and the viewport is clipped to the min height of the viewport (ie. the passed height).

Here's a simple codepen to demonstrate the issue https://codepen.io/larowlan/pen/MYaZwqj

To revert to a working state, change this in the html

<style>body,html { block-size: 100%; }</style>

to this

<style>body,html { block-size: auto; }</style>

Proposed resolution

User interface changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Page builder

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024