Opened 13 years ago
Closed 8 years ago
#7273 closed defect (patchwelcome)
After sort, scroller reset to (0,0)
Reported by: | Joseph Scheuhammer | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | 2.0 |
Component: | DojoX Grid | Version: | 1.6.0 |
Keywords: | Cc: | Becky Gibson, davidb | |
Blocked By: | Blocking: |
Description
Invoking sort on the grid by, say, clicking a column header causes parts of the DOM to be replaced. A side effect is that the current position of the scroller is lost, and it is reset to (0,0).
To reproduce:
- load http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_keyboard.html
- move the grid's horizontal scroll bar such that column 15 is in view.
- click column 15 header to sort the grid.
- after the sort is finished, the horizontal position of the grid is reset back to column 1.
The grid scroll position should not change.
Attachments (3)
Change History (24)
comment:1 Changed 13 years ago by
Milestone: | tbd → 1.2 |
---|
comment:2 Changed 13 years ago by
Owner: | changed from Bryan Forbes to Nathan Toone |
---|---|
Status: | new → assigned |
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This problem still occurs on 1.3
comment:5 Changed 12 years ago by
I looked at the changeset. It only restores vertical position, not both vertical and horizontal...
comment:6 Changed 12 years ago by
Also, there is another problem specific to IE. When it snaps back to the left, the header doesn't follow and alignment is off. I'll attach two files that readily show this. I tracked down (Along with Ben Schell) how to at least fix the alignment issue on IE. I'll attach a patch as well.
In reality, it ought to be keeping horizontal position, but at min it needs to at least keep the headers aligned if it snaps back.
comment:7 Changed 12 years ago by
In IE, load grid.html, then scroll all the way right (Do not change top/bottom scroll). Click sort. The table body snaps back to all the way left ... but the header does not. It won't correct until you move a scroller.
I should also note that if you have already scrolled down and then right, it doesn't occur. It only occirs when scrollTop = 0;
We tracked this down to on IE the scroll event doesn't seem to fire for scrollTop = 0. We found a simple workaround for it. I'll attach a patch next.
Changed 12 years ago by
Attachment: | grid.patch added |
---|
Patch to fix the IE header align issue. (Doesn't fix the snap left, but it does fix IE so they stay aligned like FF does)
comment:8 Changed 12 years ago by
Milestone: | 1.2 → 1.3 |
---|---|
Owner: | changed from Nathan Toone to Bryan Forbes |
Priority: | normal → high |
Status: | reopened → new |
Summary: | Grid: after sort, scroller reset to (0,0) → [patch][ccla] Grid: after sort, scroller reset to (0,0) |
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:10 Changed 12 years ago by
Milestone: | 1.3 → future |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | [patch][ccla] Grid: after sort, scroller reset to (0,0) → After sort, scroller reset to (0,0) |
I checked in the patch to fix the header align issue in IE. I'm moving this to future because this is going to be an invasive fix.
comment:11 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Had a thorough testing on all browsers by using the mentioned test case, not seeing this issue anymore in 1.6, so closing this as worksforme.
comment:12 Changed 10 years ago by
Milestone: | future → 1.6.1 |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Version: | 1.1.1 → 1.6.0 |
I just tested this again in Firefox 3.6, IE6, IE7, IE8, Chrome 10.0.648.127, Chrome 9.0.597.107, and Safari 5.0.3 (6533.19.4). Safari and Chrome 9 are the only ones that returns to the top. This needs further investigation as to why Safari and Chrome 9 don't return to the previous scroll position.
comment:15 Changed 9 years ago by
According to #12224, this behavior happens because of the first line of dojox.grid._View#render
. I need to investigate this further.
comment:17 Changed 9 years ago by
this ticket is a 1.8 blocker because it was moved automatically from high to blocker at some point. See:
"Bulk update of open ticket priorities."
that's why I think we can downgrade it to not block the release.
comment:18 Changed 9 years ago by
Priority: | blocker → high |
---|
comment:19 Changed 9 years ago by
Milestone: | 1.8 → 2.0 |
---|
1.8 has been tagged; moving all outstanding tickets to next major release milestone.
comment:20 Changed 8 years ago by
comment:21 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | reopened → closed |
just a clarification - horizontal scroll should not be reset...what about vertical scroll? Since you are sorting, there is no concept of "where you were" - that is,