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
Open
SCAL-325118 Fixed Prevent hidden pre-render wrapper from adding scroll height to host page#606shivam-kumar-ts wants to merge 2 commits into
shivam-kumar-ts wants to merge 2 commits into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
…l height to host page
shivam-kumar-ts
force-pushed
the
SCAL-325118
branch
from
July 30, 2026 11:50
52c1a5d to
3211728
Compare
commit: |
…f-screen positioning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.