Results 1 to 4 of 4

Thread: Problem with destroying List while it bouncing

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4345 in a recent build.
  1. #1

    Default Problem with destroying List while it bouncing

    Look this http://new.senchafiddle.com/#/cKm3p/

    How to reproduce:
    Scroll list to end. When it has bounced tap the delete button. You will get the error in Ext.util.translatable.CssTransform.doTranslate

    Uncaught TypeError: Cannot read property 'style' of undefined

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450

    Default

    I edited your test case to be automatic with destroying the list:

    Code:
    Ext.Viewport.add({
        xtype    : 'list',
        itemTpl  : '{title}',
        infinite : true,
        data     : [
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 1' },
            { title : 'Item 2' },
            { title : 'Item 3' },
            { title : 'Item 4' }
        ]
    });
    
    var list     = Ext.Viewport.down('list'),
        scroller = list.getScrollable().getScroller();
    
    scroller.on('scroll', function (scroller, x, y) {
        var maxPosition = scroller.maxPosition,
            maxY        = maxPosition.y;
    
        if (y > maxY && maxY - y > -50) {
            list.destroy();
        }
    });
    Tested in 2.1.1 and yes I do get the error. In 2.2.0 I get a different error but kind of the same thing. To fix this you need to stop the animation like so:

    Code:
    Ext.define('Override.dataview.List', {
        override : 'Ext.dataview.List',
    
        destroy : function() {
            var scroller = this.getScrollable().getScroller();
    
            scroller.stopAnimation();
    
            this.callParent(arguments);
        }
    });
    Will be opening this as a bug.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450

    Default

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

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Fixed for the next release.

    Code:
    Ext.define('Override.CssTransform', {
        override: 'Ext.util.translatable.CssTransform',
    
        doTranslate: function(x, y) {
            var element = this.getElement();
            if (!this.isDestroyed && !element.isDestroyed) {
                element.translate(x, y);
            }
        }
    });

    Sencha Inc

    Jamie Avins

    @jamieavins

Posting Permissions

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