Skip to content

Conversation

@Ladekarl
Copy link
Contributor

@Ladekarl Ladekarl commented Oct 13, 2016

If a grids viewport height, canvas height and scrollbar height has values so that the calculation:
canvas height - viewport height + scrollbar height returns 0, all the rows will dissapear when the grid is scrolled.

@dlgski
Copy link
Contributor

dlgski commented Oct 17, 2016

can you provide an issue/plunker?

@Ladekarl
Copy link
Contributor Author

Ladekarl commented Oct 20, 2016

Scroll the grid in this plunker all the way down, and then scroll it all the way up again.
The screen must have 1200 pixels in height (tested on 1600x1200 and 1920x1200 screens).
The chrome browser must be maximized.
Of course this issue can occur on other screen resolutions but the grid here is modified so that the issue occurs on screens with 1200 pixels in height.

http://run.plnkr.co/plunks/o8pfNE/

Before scroll:
image

After scroll:
image

@Ladekarl
Copy link
Contributor Author

Noticed the same calculation is done when scrolling horizontally. Updated the pull request to also fix horizontal scrolling

@mportuga
Copy link
Member

mportuga commented Nov 7, 2016

@Ladekarl I tried setting my browser window to the sizes that you mention and I don't have a scroll bar at those points. I also tried resizing my window as to get a scroll bar and I can't reproduce it.

@Ladekarl
Copy link
Contributor Author

Ladekarl commented Nov 7, 2016

@mportuga could be because the viewport isn't sized exactly the same because of bookmarks or whatever. However, it should be clear from the code that a division by 0 error is plausible. Do you want me to record a video for you?

@Ladekarl
Copy link
Contributor Author

Ladekarl commented Nov 8, 2016

I recorded a video: http://webmshare.com/jMJ1d

@dlgski dlgski merged commit 29c0a36 into angular-ui:master Nov 8, 2016
@Ladekarl Ladekarl deleted the fix-rendered-columns-zero-if-vertical-scrollbar-is-very-small branch November 8, 2016 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants