fix(grid): eliminate empty space after last column and scrollbar not reaching the end#17440
Open
Zneeky wants to merge 2 commits into
Open
fix(grid): eliminate empty space after last column and scrollbar not reaching the end#17440Zneeky wants to merge 2 commits into
Zneeky wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an issue in the grid virtualization scroll helpers where the horizontal scrollbar could not reach the true end of the content (leaving empty, unscrollable space after the last column), caused by a phantom vertical scrollbar appearing inside the horizontal virtual helper.
Changes:
- Constrained the vertical virtual helper to only scroll vertically by setting
overflow-x: hidden. - Constrained the horizontal virtual helper to only scroll horizontally by setting
overflow-y: hidden.
grid.calcWidth already subtracts the vertical scrollbar width, so adding grid.scrollSize again double-counted it. This was previously masked by the horizontal scroll gap bug, which coincidentally shrank the rendered area by the same amount. Now that the gap is fixed, update the assertion to compare directly against grid.calcWidth.
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.
Closes #17428
Description
Fixes the Grid's horizontal scrollbar leaving empty, unscrollable space after the last
column, with the scrollbar thumb never reaching the end of its track.
Root cause:
igx-horizontal-virtual-helper(and its vertical counterpart) used a sharedoverflow: autoon both axes. The horizontal helper's height is pinned to exactly thenative scrollbar thickness, so once the real horizontal scrollbar claims that space,
clientHeightbecomes0. Sinceoverflow-ywas alsoauto, the helper's 1px-tallplaceholder content then always "overflows" that 0px client height, causing the browser
to spawn a phantom vertical scrollbar. That phantom scrollbar eats ~16-17px of width from
the helper, shrinking its effective scrollable range below the real content width — so
the grid can never scroll far enough to bring the last column fully into view.
Fix: constrain each virtual helper to scroll only along its intended axis —
overflow-y: hiddenon the horizontal helper andoverflow-x: hiddenon the verticalhelper (defensive, symmetrical fix for the same latent failure mode) in
_igx-vhelper.scss.Motivation / Context
Reported bug: opening almost any grid sample with a horizontal scrollbar (e.g. the Grid
Filtering dev sample) and scrolling all the way to the right leaves a gap after the last
column, and the horizontal scrollbar thumb stops short of the track's end.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Grid (and other grid-based components sharing
igxForvirtualization: Tree Grid,Hierarchical Grid, Pivot Grid) — horizontal/vertical virtual scrollbar helpers.
How Has This Been Tested?
Manually reproduced and verified via the Grid Filtering dev sample: measured
clientWidth/scrollWidthofigx-horizontal-virtual-helperbefore and after the fix,and confirmed
scrollLeftnow reaches exactlyscrollWidth - clientWidth, with the lastcolumn ("Index") flush against the grid's right edge.
Test Configuration:
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes