Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some browsers show grid viewport too wide by 1px #1843

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Feb 12, 2025

  • so in some rare cases, some browsers incorrectly show the horizontal scrollbar for the grid when it shouldn't. The weird thing is that the scrollbar is only showing for 1px. We can fix this by simply looking at the available viewport inner width (that is the viewport minus the scrollbar width), and if the width is the same then there's no need to apply this width to the grid pane (prior to this PR, the calculated inner width was always applied to the grid pane, but now it won't be applied when it doesn't need it.... or in other words, only apply the grid pane width when it is larger than the available viewport width)
  • in my case it happened with Ms Edge, though it probably could be any browsers

before fix, some browsers showed the scrollbar

image

with the fix in the same browser

image

Copy link

stackblitz bot commented Feb 12, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.0%. Comparing base (cd7995e) to head (6334052).

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #1843     +/-   ##
=========================================
+ Coverage   100.0%   100.0%   +0.1%     
=========================================
  Files         187      187             
  Lines       34485    34490      +5     
  Branches    10255    10255             
=========================================
+ Hits        34459    34464      +5     
  Misses         26       26             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghiscoding ghiscoding marked this pull request as draft February 12, 2025 06:15
@ghiscoding
Copy link
Owner Author

ghiscoding commented Feb 12, 2025

hmm so thanks to all our Cypress tests (now failing), I can conclude that this is not a good fix. I'll have to investigate some more

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.

1 participant