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(Grid.js) Vertical scroll calculates height wrong with enableHorizontalScrollbar: NEVER #6690

Merged
merged 4 commits into from
Apr 23, 2018

Conversation

m4m4m4
Copy link
Contributor

@m4m4m4 m4m4m4 commented Apr 23, 2018

Use scrollbarHeight instead of scrollbarWidth for vertical scroll calculations. scrollbarHeight has the value 0 when enableHorizontalScrollbar is set to NEVER.

Round calculated boundary values as computed style may have decimal number which will not match pixelsToSeeRow

Related to: #6653

…ectly

Since scrollIfNecessary is called multiple times when enableCellEditOnFocus is true we need to make sure the scrollbarWidth and footerHeight is accounted for to not cause a loop.

fixes angular-ui#6653
Make sure gridCol is not null before checking for enableCellEditOnFocus
…ontalScrollbar: NEVER

Use scrollbarHeight instead of scrollbarWidth for vertical scroll calculations. scrollbarHeight has the value 0 when enableHorizontalScrollbar is set to NEVER.

Round calculated boundary values as computed style may have decimal number which will not match pixelsToSeeRow
@m4m4m4
Copy link
Contributor Author

m4m4m4 commented Apr 23, 2018

Found two more scenarios where a loop could occur, seem to be specifically firefox.
It's easy to reproduce on firefox with this plunkr:
http://plnkr.co/edit/4RnRdl5pSlmdKhO3K1pa?p=preview

@mportuga mportuga merged commit 1b01490 into angular-ui:master Apr 23, 2018
defields923 pushed a commit to defields923/ui-grid that referenced this pull request Oct 30, 2018
…ontalScrollbar: NEVER (angular-ui#6690)

* fix(Grid.js): ScrollIfNecessary does not account for scrollWidth correctly

Since scrollIfNecessary is called multiple times when enableCellEditOnFocus is true we need to make sure the scrollbarWidth and footerHeight is accounted for to not cause a loop.

fixes angular-ui#6653

* Add check for gridCol not null

Make sure gridCol is not null before checking for enableCellEditOnFocus

* fix(Grid.js) Vertical scroll calculates height wrong with enableHorizontalScrollbar: NEVER

Use scrollbarHeight instead of scrollbarWidth for vertical scroll calculations. scrollbarHeight has the value 0 when enableHorizontalScrollbar is set to NEVER.

Round calculated boundary values as computed style may have decimal number which will not match pixelsToSeeRow
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.

3 participants