PDA

View Full Version : [FIXED] Scrolling to the top of the grid after saving



zerkms
31 Jan 2013, 1:49 PM
ExtJS versions affected: 4.1.x

In the PagingScrolle::onViewRefreshMethod() there is a such part of the code:

// No scroll monitoring is needed if
// All data is in view OR
// Store is filtered locally.
// - scrolling a locally filtered page is obv a local operation within the context of a huge set of pages
// so local scrolling is appropriate.
if (store.getCount() === store.getTotalCount() || (store.isFiltered() && !store.remoteFilter)) {
me.stretcher.setHeight(0);
me.position = viewDom.scrollTop = 0;


// Chrome's scrolling went crazy upon zeroing of the stretcher, and left the view's scrollTop stuck at -15
// This is the only thing that fixes that
me.setTablePosition('absolute');


// We remain disabled now because no scrolling is needed - we have the full dataset in the Store
return;
}

So if we have a view several rows smaller than the buffer size (say the view of 30 rows and a buffer of 40) and:
1. Scroll to the latest row
2. Edit it (assuming any of grid editing plugin is activated)
3. Save the edit

After that the grid is scrolled up to the top.

Why is it intended by the implementation?

From my perspective - it's a bug. The scroll should stay the same, showing the latest rows.

Thoughts?

mitchellsimoens
1 Feb 2013, 8:39 AM
Thanks for the report! I have opened a bug in our bug tracker.

Animal
18 Apr 2013, 11:31 AM
Is this still an issue with 4.2.0? It works for me if I refresh the view in the buffer-grid example page.

I'd like to close this ticket if possible

zerkms
18 Apr 2013, 12:39 PM
Is this still an issue with 4.2.0? It works for me if I refresh the view in the buffer-grid example page.

I'd like to close this ticket if possible

Hi, I cannot check it right in our app since we didn't start migration to 4.2 yet, but according to code it should be fine

Animal
18 Apr 2013, 9:22 PM
Thanks. I'll close this ticket now.