ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Scrolling to the right end results in shift between header and body

Open AnneLaureF opened this issue 11 years ago • 30 comments

When reaching the right end of the grid the header columns and the data columns are not properly aligned. See for example on the homepage: image I suspect this example shouldn't scroll (and the one below definitely shouldn't).

It seems the header row and the grid have the same canvas width and the same viewport width but the grid has the vertical scrollbar.

It doesn't happen in commit d9b2314fca4d34e4a276d44bbc2d00e9a76d558a so it's been introduced after that. Maybe the scrollbar width was added to the grid canvas width somewhere and it should have been removed when changing the way scroll works ?

AnneLaureF avatar Jan 09 '15 10:01 AnneLaureF

There were some substantial changes went into scrolling yesterday, which should have fixed some of these issues (or perhaps they newly created this?). Could you perhaps check again?

PaulL1 avatar Jan 10 '15 20:01 PaulL1

This still exists, and was introduced with the 30df7d4af08d9151cdb1c39bf15a76b44a77ab2e merge, which also appears to have broken both enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER and enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER.

Similarly, the vertical row selection header is now misaligned when you scroll all the way to the bottom.

http://plnkr.co/edit/juFzMptmHdOLky9jlPzU?p=preview

axelstudios avatar Jan 11 '15 04:01 axelstudios

Just confirming the issue is still present in 97dbff87d3a25e24578eec5f16214a894ec4b9a8

AnneLaureF avatar Jan 12 '15 07:01 AnneLaureF

I am still seeing this with the latest unstable.

herdanskecommodities avatar Jan 29 '15 20:01 herdanskecommodities

@axelstudios I'm not positive this was introduced with 30df7d4 (Jan 8) if only because I'm still on RC18 (Dec 9) and I'm noticing this same misalignment. Possibly there are multiple causes of the issue.

In my case it would only appear when the user horizontally scrolled the grid due to large datasets. My misalignment was solved when I assigned a class with a width to my ui-grid element.

kencaron avatar Feb 04 '15 00:02 kencaron

For me, this bug is gone with the latest unstable.

axelstudios avatar Feb 05 '15 16:02 axelstudios

This bug still exists for me with latest unstable and rc19.

c0bra avatar Feb 16 '15 16:02 c0bra

@kencaron Can't have been 30df7d4; the only changes there are syntax and whitespace alterations for a merge commit.

c0bra avatar Feb 16 '15 16:02 c0bra

@sachinny21 OK I'll take a look

c0bra avatar Feb 19 '15 15:02 c0bra

thanks cobra!

sachin-bs avatar Feb 19 '15 15:02 sachin-bs

Not sure how helpful this is as I can't reliably reproduce this. Started removing columns when the width of the grid was wider than the containing div.

RC20 in Firefox 35 on OS X 10.10.2

kencaron avatar Feb 27 '15 18:02 kencaron

@sachinny21 I'm not seeing this behavior on my test grid:

no_gap_grid

Can you double-check it?

c0bra avatar Mar 11 '15 21:03 c0bra

I'm still seeing something like this in 1fdcf3d1c in current master, although the behaviour for me is different. I have a lot of columns, and as I scroll, periodically entire headers vanish and leave with fewer headers than columns. Not sure if this is identical in cause: I'll see if I can pin down the commit as it wasn't there in rc16.

morungos avatar Mar 18 '15 18:03 morungos

Okay, the issue I've seen is in 893bb13 (fix(uiGridHeader): Fix dynamic header heights), and therefore it isn't the same. Taking a wild guess, it's the lines which take away the min-height constraint on header cells allowing them to collapse away entirely when there are too many to fit. I'll try to build a small example to demonstrate.

morungos avatar Mar 18 '15 19:03 morungos

@morungos Any luck on making that example? Can you tell me if you're having issues in a particular browser. I know that table-based CSS can be a bit wonky between different browsers and versions.

c0bra avatar Mar 30 '15 16:03 c0bra

@c0bra Sadly no -- my app is in healthcare, so I just didn't get time to remove all the bits I needed to, and there were too many weird requests from my users to sustain with the current status of ui-grid, so I've switched for now to handsontable for now, which isn't as clean an API but does seem to handle the basic UI/scrolling/editing well, if without the scalability I'll need some day.

morungos avatar Mar 31 '15 18:03 morungos

Ah, I understand. Thanks for the info on this issue, though. I'll look into the column collapsing thing.

c0bra avatar Mar 31 '15 22:03 c0bra

Since there have been so many changes to scrolling recently I'm going to close this as the only thing left was a difficult-to-repro column collapsing issue. If it's still a problem after the scrolling changes I trust it will be filed again.

c0bra avatar Apr 13 '15 20:04 c0bra

I thought this was completely gone until I received screenshots of this on IE9. Really can't blame anyone for not wanting to deal w/ that browser though.

ghost avatar Apr 13 '15 22:04 ghost

I'm having this exact issue in IE9. It is the same in 20 and 21.

It seems to work fine when only a few columns are displayed - but has problems when there are more and it has to scroll

jtpolizzi avatar Jun 01 '15 17:06 jtpolizzi