Results 1 to 2 of 2

Thread: [ExtJS 4.1.1RC2] Docked Toolbar: enableOverflow: true throws error on destroy

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    79

    Default [ExtJS 4.1.1RC2] Docked Toolbar: enableOverflow: true throws error on destroy

    REQUIRED INFORMATION

    Ext version tested:

    • Ext 4.1.1 RC2
    • Ext 4.1.1 RC1 (which is working)
    Browser versions tested against:
    • Chromium 18.0.1025.151
    DOCTYPE tested against:
    • See example below
    Description:
    • When you use enableOverflow:true in a docked toolbar, you can no longer destroy the component.
    Steps to reproduce the problem:
    • Create a window, and add a dockedItem of xtype "toolbar"
    • Create an instance of that window using Ext.create, then destroy it
    The result that was expected:
    • The window is destroyed without any errors
    The result that occurs instead:
    • The window isn't destroyed, but the following error is thrown:
    • Uncaught TypeError: Cannot call method 'getItemId' of undefined
    Test Case:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
            "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>PartKeepr</title>
            <script type="text/javascript" src="../3rdparty/extjs/ext-all-debug.js"></script>
            
            <script type="text/javascript">
            Ext.define('TestWindow', {
                extend: 'Ext.Window',
                
                initComponent: function () {
                    this.dockedItems = [{
                           xtype: 'toolbar',
                           enableOverflow: true
                    }];
                    
                    this.callParent(arguments);
                }
            });
            
            Ext.application({
                name: 'Test',
                launch: function() {
                       var j = Ext.create("TestWindow");
                       j.destroy();    
                }
            });
            </script>
            </head>
        <body>
        </body>
    </html>

    HELPFUL INFORMATION
    Possible fix:
    • not provided
    Others:
    • You can toogle between working and non-working test case code by setting enableOverflow to false
    • This works with ExtJS 4.1.1RC1 and ExtJS 4.1.0

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,253

    Default

    Thanks for the test case, we already have this one resolved for the final.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

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