Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    MKR54 is on a distinguished road

      0  

    Default Ext.gesture.Manager.removeEventListener bug?

    Ext.gesture.Manager.removeEventListener bug?


    Sencha Touch version tested:
    • v1.1.1
    Platform tested against:
    • Google Chrome
    • HTC Incredible S710e with Android 2.3.5
    Description:
    • Ext.gesture.Manager.addEventListener always add new event targets to this.targets (if the target is not there already)
    • Ext.gesture.Manager.removeEventListener newer removes event targets from this.targets
    • The number of targets in Ext.gesture.Manager.targets will continue to grow for as long as the application is running
    • This causes my phone to freeze in a Ext.List if I just repeatedly scroll the list up and down and click in to the item and back to the list (running in PhoneGap - i need to close the app from the Android settings menu when it freezes and there are no error messages in the console)
    Sample code:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" href="lib/sencha/resources/css/sencha-touch.css" type="text/css">
        <script type="text/javascript" src="lib/sencha/sencha-touch-debug-w-comments.js"></script>
        <script type="text/javascript" src="bug.js"></script>
    </head>
    <body></body>
    </html>
    Code:
    Ext.setup({
        onReady: function() {
            Ext.regModel('Contact', {
                fields: ['firstName', 'lastName']
            });
    
            var store = new Ext.data.JsonStore({
                model  : 'Contact',
                sorters: 'lastName',
    
                getGroupString : function(record) {
                    return record.get('lastName')[0];
                },
    
                data: [
                    {firstName: 'Tommy',   lastName: 'Maintz'},
                    {firstName: 'Rob',     lastName: 'Dougan'},
                    {firstName: 'Ed',      lastName: 'Spencer'},
                    {firstName: 'Jamie',   lastName: 'Avins'},
                    {firstName: 'Aaron',   lastName: 'Conran'},
                    {firstName: 'Dave',    lastName: 'Kaneda'},
                    {firstName: 'Michael', lastName: 'Mullany'},
                    {firstName: 'Abraham', lastName: 'Elias'},
                    {firstName: 'Jay',     lastName: 'Robinson'}
                ]
            });
    
    
            Ext.reg("listview", Ext.extend(Ext.List, {
                fullscreen: true,
                itemTpl : '{firstName} {lastName}',
                store: store,
                listeners : {
                    itemtap : function(list, index, element) {
                        var item = mainView.setMainContent({
                            xtype : "itemview",
                            fullName: element.innerText
                        });
                    }
                }
            }));
    
            Ext.reg("itemview", Ext.extend(Ext.Panel, {
                fullscreen: true,
                items: [{
                    xtype: 'panel',
                    html: 'Showing the item!'
                }, {
                    xtype: 'button',
                    text: 'Back',
                    handler: function() {
                        mainView.setMainContent({
                            xtype : "listview"
                        });
                    }
                }],
                layout: 'vbox'
            }));
    
            Ext.reg("mainview", Ext.extend(Ext.Panel, {
                fullscreen : true,
                layout : 'fit',
                setMainContent : function(componentConfig) {
                    var me = this;
                    var currentContent = this.getComponent("content");
                    if (currentContent) {
                        me.remove(currentContent);
                    }
                    if (componentConfig != null) {
                        Ext.applyIf(componentConfig, {
                            id : "content"
                        });
                        var newContent = Ext.ComponentMgr.create(componentConfig);
                        me.add(newContent);
                        me.doLayout();
                    }
                }
            }));
    
            var mainView = Ext.ComponentMgr.create({
                xtype : "mainview"
            });
    
            mainView.setMainContent({
                xtype : "listview"
            });
        }
    });
    Steps to reproduce the problem:
    • Click on an item in the list
    • Click on the "Back" button
    • Ext.gesture.Manager.targets has now been increased by 3 targets
    Possible fix:
    • Add this.targets.remove(target) to Ext.gesture.Manager.removeEventListener

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    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


    Gestures are totally different in ST2 so this bug may not be relavant anymore.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    MKR54 is on a distinguished road

      0  

    Default


    It is relevant whether you can confirm that it is a bug and that the fix is correct (or we are doing something wrong in the way we use ST1).

    ST2 is a preview release and therefore not ready for production.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi