Repository navigation
fix: canvas tables that only just fit flicker between scrollbar states every frame (scrollbar-gutter) - #10264
Open
nishantmonu51 wants to merge 1 commit into
Open
nishantmonu51 wants to merge 1 commit into
nishantmonu51 wants to merge 1 commit into
Conversation
…s every frame With classic (always-visible) scrollbars, a canvas table fills its wrapper's client width, which the vertical scrollbar narrows when it appears. A table that fits only without scrollbars then loops: columns sized for the full width overflow once the vertical scrollbar shows, the horizontal scrollbar grows the wrapper, the resize refits the columns to the narrower width, both scrollbars go away, and the next resize widens the columns again. `scrollbar-gutter: stable` on the fill-width wrapper reserves the scrollbar's space, so the client width no longer depends on the scrollbar.
This branch has not been deployed
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.
With classic (always-visible) scrollbars, such as on Windows or on macOS with "Show scroll bars: Always" or a mouse attached, a canvas table or pivot whose rows only just fit its widget redraws on every frame. It switches between a layout without scrollbars and one with both scrollbars, so the table flickers continuously.
Steps to reproduce
What the fix does
fillWidth, withbind:clientWidthread on each border-box resize). A vertical scrollbar narrows that width, so the table loops:scrollbar-gutter: stableon the fill-width wrapper reserves the scrollbar's space, so the client width no longer depends on whether the scrollbar shows.Separate from #10263, which fixes scrolled tables losing their rows on canvas refreshes.
Checklist: