Results 1 to 4 of 4

Thread: Component's event(s) suspending state is ignored by Controllers / Application

    You found a bug! We've classified it as EXTJS-9309 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    529
    Vote Rating
    7
      1  

    Default Component's event(s) suspending state is ignored by Controllers / Application

    REQUIRED INFORMATION


    4.2.0
    • Ext 4.2.0 rev 663


    Browser versions tested against:
    • Chrome (26.0.1410.43)


    DOCTYPE tested against:
    • <!DOCTYPE HTML>


    Description:
    • Component's event(s) suspending state is ignored by Controllers / Application if handlers are attached via controller's controll() method.


    Steps to reproduce the problem:
    • Create any component, let's say Button
    • Attach to it's 'click' event directly via button's on() method, console.log('Direct') in the handler
    • Attach to it's 'click' event via controller's control() method, console.log('Control') in the handler
    • Suspend button's events
    • Click the button
    • See the console output


    The result that was expected:
    • - no output -


    The result that occurs instead:
    • Control


    Test Case:

    Code:
    function test()
    {
        var controller;  
    
        controller = Ext.create('Ext.app.Controller', {
    
            refs : [{
                ref : 'btn',
                xtype : 'button',
                autoCreate : true,
                renderTo : Ext.getBody(),
                text : 'Click me',
                id : 'clickme'
            }],
    
            init : function()
            {
                this.getBtn().on('click', function() { console.log('Direct'); });
    
                this.control({
                    '#clickme' : {
                        'click' : function() { console.log('Control'); }
                    }
                });
            }
        });
    
        controller.init();
    
        controller.getBtn().suspendEvents();
    }
    
    Ext.onReady(test);
    Use the force - read the source.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Vote Rating
    1271
      0  

    Default

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

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,711
    Vote Rating
    245
      0  

    Default

    FYI- This is a duplicate of http://www.sencha.com/forum/showthread.php?171525 so I am closing this ticket.

    We have your test case in the tracker still though, so thanks for the thorough submission!
    Don Griffin
    Director of Engineering - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  4. #4
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    110
    Vote Rating
    12
      0  

    Default

    Bump. Usage of control: {} is the preferred method of handling events in MVC. That's all we try to use. This bug is a big hindrance.

    Tested on 4.1.2a

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
  •