When the height of the preview changes, it moves up and down in the viewport

Created on 19 September 2024, 7 months ago
Updated 20 September 2024, 7 months ago

Overview

When a user takes actions that result in the height of the previewed page increasing or decreasing, the canvas dynamically changes height to accommodate. Because the iFrame is vertically aligned in the center of the canvas, when its height changes, the iFrame appears to jump up or down.

This issue is fairly long standing I think but became much more apparent after [later phase] Total canvas size should be dynamic based on browser viewport size Needs review and 🐛 Remove flickering when preview is being updated Fixed were both in place.

Proposed resolution

Before updating the preview take note of the position on screen of the .previewContainer (e.g. how many pixels from the top left of the screen is the top left of the .previewContainer)
After the preview has updated update the scroll position of the canvas to ensure the top left of the .previewContainer back to what it was.

🐛 Bug report
Status

Active

Component

Page builder

Created by

🇬🇧United Kingdom jessebaker

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024