fix(embed): prevent inline embed layout shift on narrow viewports#28481
Open
mvanhorn wants to merge 1 commit intocalcom:mainfrom
Open
fix(embed): prevent inline embed layout shift on narrow viewports#28481mvanhorn wants to merge 1 commit intocalcom:mainfrom
mvanhorn wants to merge 1 commit intocalcom:mainfrom
Conversation
Disable scrolling on inline embed iframes to prevent transient scrollbar from causing width shifts when content height changes during day switches. Inline embeds manage height dynamically via __dimensionChanged events, so internal iframe scrolling is not needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
sahitya-chandra
left a comment
There was a problem hiding this comment.
Can you add a video demo?
Author
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.

Summary
Fixes the layout shift that occurs on narrow viewports when switching between days in the inline embed. The shift is caused by a transient scrollbar appearing inside the iframe while the content height changes and before the parent can adjust the iframe height via
__dimensionChanged.scrolling="no"attribute andoverflow: hiddenstyle to inline embed iframes__dimensionChangedevents, so internal iframe scrolling is not needed.cal-inline-containeralready handles scrollbar hiding via CSSFixes #28475
Visual Demo
The fix prevents the brief scrollbar flash visible in this CodeSandbox linked from cal.com embed help docs when switching days on a narrow viewport.
Type of Change
How should this be tested?
Test in both Chrome and Firefox, as the issue manifests slightly differently (Chrome shows a brief scrollbar flash, Firefox shows persistent scrollbar on some days).
Mandatory Tasks
This contribution was developed with AI assistance (Claude Code).