Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-8485 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2010
    Location
    Wellington, New Zealand
    Posts
    123
    Vote Rating
    5
    zerkms is on a distinguished road

      0  

    Default Scrolling to the top of the grid after saving

    Scrolling to the top of the grid after saving


    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?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2010
    Location
    Wellington, New Zealand
    Posts
    123
    Vote Rating
    5
    zerkms is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    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

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Thanks. I'll close this ticket now.

Thread Participants: 2