Grid height activating scroll intermittently
See original GitHub issueHi there!
I’ve run across a possible bug that happens when the grid heigh is on the threshold that the browser defines for showing/hiding the scrollbar:

I have colWidth is set to ‘auto’ and rowHeight is ‘match’.
This happens when for example the grid has four rows, but if it had a fifth the grid height it would be on the browser scrollbar overflow threshold.
It seems there are two watches that are triggering other’s, always updating their size. as a workaround I commented the line
function updateHeight() {
$elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
}
This workaround is not great because then the grid has no real heigh…
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
Telerik Web Forms Resizing Grid with Scrolling when Data is ...
Resizing Grid with Scrolling when Data is Less Than Scroll Height. Sometimes your application may reduce the records that RadGrid displays by some...
Read more >Auto-placement in grid layout - CSS: Cascading Style Sheets
In this next example I have created a grid with three row tracks of 200 pixels height. I am auto-placing by column and...
Read more >ag-Grid Row Models: Infinite Scrolling
The grid will have an 'auto extending' vertical scroll. That means as the scroll reaches the bottom position, the grid will extend the...
Read more >How to auto increase Grid header height as per dynamic ...
Applying a style to enable scrolling on the content element would be the “easy” way to do it. But I don't know if...
Read more >Content Jumping (and How To Avoid It) | CSS-Tricks
A few seconds after initial visit the headings (and sometimes ... To fix it, I used the browser's DevTools to measure the height...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So I have researched a workaround for that. The main Idea is reducing my app container right margin with scroll width when it appears. So scroll appearing doesnt change actual document height and gridster doesnt goes to this infinite loop of resizing.
There is a directive for scrollbar width detecting I’m using. So I created a directive which reacts on gridster resizes and add/remove margin shift if needed.
I applied this directive on my application container div which has margins 32px by default. So now when scroll appears it reduces to 17px.
Tested on latest master (ManifestWebDesign/angular-gridster#281de99) but should work on any version.
as a temporary work around i simply applied:
overflow-y: scroll
to the grid - this makes the y scroll bar appear always, which stops the scroll bar showing and hiding which affects the alignment of the tiles.
not ideal as the y scroll always shows, but it solved a headache for me