Skip to content

Fix scrollbars appearing in inbox-zero animation iframes - #2821

Open
m-salman-afzal wants to merge 2 commits into
Foundry376:masterfrom
m-salman-afzal:fix/empty-message-scrollbar
Open

Fix scrollbars appearing in inbox-zero animation iframes#2821
m-salman-afzal wants to merge 2 commits into
Foundry376:masterfrom
m-salman-afzal:fix/empty-message-scrollbar

Conversation

@m-salman-afzal

Copy link
Copy Markdown

The five Tumult Hype exports render a stage that is exactly 600x500, matching the iframe dimensions set in empty-list-state.less. Chromium 43 (electron 41.7.2 -> 43.4.1) renders non-overlay scrollbars that reserve layout space rather than floating above content, so the stage no longer fit its viewport: one scrollbar appeared, consumed ~15px, pushed the other axis into overflow, and the second appeared in turn.

The scrollbars belong to the iframe's own viewport, which the embedding document cannot style — overflow on an <iframe> element applies to the replaced box, not the document inside it. Set overflow:hidden on the root element of each export instead, where it propagates to the viewport and suppresses both axes.

Preferred over scrolling="no" on the iframe, which achieves the same result via the frame owner but is non-conforming and long deprecated.

The five Tumult Hype exports render a stage that is exactly 600x500,
matching the iframe dimensions set in empty-list-state.less. Chromium 43
(electron 41.7.2 -> 43.4.1) renders non-overlay scrollbars that reserve
layout space rather than floating above content, so the stage no longer
fit its viewport: one scrollbar appeared, consumed ~15px, pushed the
other axis into overflow, and the second appeared in turn.

The scrollbars belong to the iframe's own viewport, which the embedding
document cannot style — overflow on an <iframe> element applies to the
replaced box, not the document inside it. Set overflow:hidden on the
root element of each export instead, where it propagates to the viewport
and suppresses both axes.

Preferred over scrolling="no" on the iframe, which achieves the same
result via the frame owner but is non-conforming and long deprecated.
@foundry376-bot

Copy link
Copy Markdown

This pull request has been mentioned on Mailspring Community. There might be relevant details there:

https://community.getmailspring.com/t/scrollbar-on-empty-animations/14555/1

@bengotow

Copy link
Copy Markdown
Collaborator

Thanks for committing this! I think this makes sense, but one of the five is overflow: auto with a comment that suggests it should also be overflow:hidden, is there a reason for the airstrip one being different?

@m-salman-afzal

Copy link
Copy Markdown
Author

No, I was testing something and may have forgotten about it. Will update. Thanks. I have updated the pr. Kindly recheck.

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.

3 participants