fix(grid): eliminate empty space after last column and scrollbar not reaching the end - 21.2.x#17442
Open
Zneeky wants to merge 1 commit into
Open
fix(grid): eliminate empty space after last column and scrollbar not reaching the end - 21.2.x#17442Zneeky wants to merge 1 commit into
Zneeky wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an issue in grid virtualization scroll helpers where a phantom cross-axis scrollbar could appear and shrink the effective horizontal scroll range, leaving empty space after the last column and preventing the horizontal scrollbar thumb from reaching the end (issue #17428).
Changes:
- Constrains the vertical virtual helper to vertical scrolling by hiding horizontal overflow.
- Constrains the horizontal virtual helper to horizontal scrolling by hiding vertical overflow.
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