Results 1 to 5 of 5

Thread: [6.5.2 Classic] Scroller is reset in lockable grids whenever an updateLayout

    You found a bug! We've classified it as EXTJS-26551 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    811

    Default [6.5.2 Classic] Scroller is reset in lockable grids whenever an updateLayout

    Fiddle: https://fiddle.sencha.com/#view/editor&fiddle/28tm

    As you can see in Fiddle the conditions to trigger the issues are:

    Code:
                bufferedRenderer: false,
                enableLocking: true,
                listeners: {
                    selectionchange: function () {
                        this.updateLayout()   // update Layout can be triggered by a button hide or show in grid's toolbar or in any other situation.
                    }
                },
    We've added an override to fix it:

    Code:
    Ext.define('App.overrides.grid.locking.Lockable', {
        override: 'Ext.grid.locking.Lockable',
    
    
        /**
         * Always update scroll on sync
         * Ext 6.5.2 added an optimize to scroll sync that fails as the elements scroll is lost during sync
         */
        doSyncLockableLayout: function () {
            var me = this,
                    collapseExpand = me.isCollapsingOrExpanding,
                    lockedGrid = me.lockedGrid,
                    normalGrid = me.normalGrid;
    
    
            me.callParent(arguments);
    
    
            // match parent, it returned without doing element work here
            if (collapseExpand) {
                return;
            }
    
    
            if (lockedGrid && normalGrid) {
                var scrollable = me.getScrollable();
                // Parent only scrolls if these are not equal
                if (Ext.Object.equals(scrollable.position, me.lastScrollPos)) {
                    scrollable.scrollTo(me.lastScrollPos);
                }
            }
        }
    });
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  2. #2
    Sencha - Support Team
    Join Date
    Sep 2017
    Posts
    67

    Default

    Hi Vadim,

    There seems to be an issue with the way the lockingScroller class is handled within the enableLocking method in the code, however I am trying to decipher if this is by design - In the meantime, could you let me know why you are attempting an updateLayout - If you could an idea about the scenario where you are encountering this issue, it might be helpful.

    Regards,
    Joe

  3. #3
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    811

    Default

    Did you see the comment in the code ?

    // update Layout can be triggered by a button hide or show in grid's toolbar or in any other situation.
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  4. #4
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    811

    Default

    And totally is not by design to have a scroller jumping like this. For helping more with deciphering, here's Nige's confirmation on this:

    Screen Shot 2017-11-01 at 9.37.34 PM.jpg
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  5. #5
    Sencha - Support Team
    Join Date
    Sep 2017
    Posts
    67

    Default

    You are correct. I did consider the updateLayout being triggered by the framework due to the changes to the grid panel - However, we were curious if you were manually triggering updateLayout for specific needs and wanted to clear that.

    I will setup a bug tracker for this and have it investigated.

    Regards,
    Joe

Similar Threads

  1. [FIXED] 6.5.0 [Classic] scroller issue with auto growing TextArea
    By jhrinoa in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 14 Jun 2017, 3:52 PM
  2. [FIXED] [6.2.1][classic] Missing parameters in Ext.Component#updateLayout()
    By coyote01 in forum Sencha Documentation
    Replies: 1
    Last Post: 18 Apr 2017, 1:04 PM
  3. Touch scroller with classic toolkit
    By f.baron in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 26 Jul 2016, 8:19 AM
  4. Replies: 1
    Last Post: 19 Feb 2013, 2:25 AM
  5. reset Scroller
    By Kurt001 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 16 Nov 2012, 3:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •