Fix ComposeViewport canvas overflow at fractional scales - #3389
Merged
Oleksandr Karpovich (eymar) merged 1 commit intoSep 16, 2026
Merged
Conversation
Oleksandr Karpovich (eymar)
requested a review
from Shagen Ogandzhanian (Schahen)
September 7, 2026 09:50
Shagen Ogandzhanian (Schahen)
approved these changes
Sep 15, 2026
Shagen Ogandzhanian (Schahen)
left a comment
There was a problem hiding this comment.
Checked manually, failed to come up with better solution (tried flex and grid approaches)
Oleksandr Karpovich (eymar)
deleted the
ok/fix_composeviewport_dimensions
branch
September 16, 2026 07:10
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.
Description:
The generated positioning container and its nested containers did not establish a definite sizing chain. As a result, the canvas’s height: 100% could not always resolve against the viewport container, and its rendered CSS size could fall back to the intrinsic aspect ratio derived from the canvas.width and canvas.height backing-store attributes.
At fractional display scales, independently rounded backing-store dimensions could make the rendered canvas slightly taller than the viewport container, causing browser scrollbars.
Giving the positioning container and its nested containers explicit dimensions ensures that the canvas’s CSS bounds are determined by the viewport container and remain independent of its backing-store size.
Fixes https://youtrack.jetbrains.com/issue/CMP-10762/Scrollbar-appears-at-some-browser-zoom-levels (see the screenshot of the problem there)
Testing
Release Notes
N/A