You found a bug! We've classified it as EXTJSIV-5102 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    2,190
    Vote Rating
    58
    slemmon is just really nice slemmon is just really nice slemmon is just really nice slemmon is just really nice

      0  

    Default [4.0.7 & 4.1 B1] Comma separated selector breaks in controller.control()

    [4.0.7 & 4.1 B1] Comma separated selector breaks in controller.control()


    REQUIRED INFORMATIONExt version tested:
    • Ext 4.1 rev B1
    • Ext 4.0.7
    Browser versions tested against:
    • FF9.0.1 (firebug 1.9.0)
    DOCTYPE tested against:
    • strict
    • whatever it is when nothing is set
    Description:
    • Using comma separated selectors in Ext.ComponentQuery.query() works fine, but if you use the same selectors in a contoller's control method it crashes the browser.
    Steps to reproduce the problem:
    • Create Ext.app.Application
    • Link to a Controller with a control method monitoring a render event on 'panel, button' and console.log() the component found
    • Create a viewport with a panel and a button.
    The result that was expected:
    • Panel is console.logged
    • Button is console.logged
    The result that occurs instead:
    • browser hangs
    Test Case:
    Code:
    // appExt.application({
        name: 'Pandora',
        autoCreateViewport: true,
        controllers: ['Main']
    	, launch: function () {
    		console.log(Ext.ComponentQuery.query('panel, button'))
    	}
    });
    // controllerExt.define('Pandora.controller.Main', {
        extend: 'Ext.app.Controller',
        init: function() {
            this.control({
                'button, panel': {
                    afterrender: this.onRender
                }
            });
        }
    	, onRender: function (cmp) {
    		console.log(cmp.id + ' was rendered')
    	}
    });
    // viewportExt.define('Pandora.view.Viewport', {
        extend: 'Ext.container.Viewport',
        layout: 'border',
        initComponent: function() {
            this.items = {
                xtype: 'panel'
    			, region: 'center'
    			, title: 'Panel'
    			, dockedItems: [{
    				xtype: 'toolbar'
    				, dock: 'top'
    				, items: [{
    					xtype: 'button'
    					, text: 'My Button'
    				}]
    			}]
            };
            this.callParent();
        }
    });
    HELPFUL INFORMATIONScreenshot or Video:
    • attached
    See this URL for live test case: http://Debugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • WinXP Pro

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    434
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thank you for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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