Skip to content

SCAL-325118 Fixed Prevent hidden pre-render wrapper from adding scroll height to host page - #606

Open
shivam-kumar-ts wants to merge 2 commits into
mainfrom
SCAL-325118
Open

SCAL-325118 Fixed Prevent hidden pre-render wrapper from adding scroll height to host page#606
shivam-kumar-ts wants to merge 2 commits into
mainfrom
SCAL-325118

Conversation

@shivam-kumar-ts

@shivam-kumar-ts shivam-kumar-ts commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

When a pre-render is hidden (e.g. on Page A while Page B is pre-rendered), the ThoughtSpot app inside the iframe sends height update events as it loads. These were updating preRenderWrapper.style.height via setIFrameHeight, causing the hidden but absolutely-positioned wrapper to grow (e.g. to 1800px) and extend the host page's scroll height, producing unexpected whitespace.

The fix moves the hidden wrapper far above the visible page (top: -10000px) instead of keeping it at top: 0. An absolutely-positioned element whose bottom edge never enters the positive scroll area cannot contribute to the document's scroll height. Crucially, the iframe inside retains its full dimensions, so charts and content continue to pre-render correctly at their natural size — no 0-height viewport issue that would have occurred with a max-height: 0 approach. When showPreRender() is called, syncPreRenderStyle() overwrites top with the correct on-screen position.

@shivam-kumar-ts
shivam-kumar-ts requested a review from a team as a code owner July 30, 2026 11:50
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@thoughtspot/visual-embed-sdk@606

commit: d987501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant