You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default [CLOSED][B3] Grid + Window Show/Close = el is undefined

    [CLOSED][B3] Grid + Window Show/Close = el is undefined


    To reproduce, run the following code, click "show win" (in grid toolbar) and "close win" (in win fbar) until you get the error.

    PHP Code:
        var states Ext.create('Ext.data.Store', {
            
    autoLoadtrue,
         
    fields: ['abbr''name'],
            
    data : [
                {
    "abbr":"AL""name":"Alabama"},
                {
    "abbr":"AK""name":"Alaska"},
                {
    "abbr":"AZ""name":"Arizona"}
                
    //...
            
    ]
        });
        var 
    view Ext.widget('viewport',{
         
    title'Fit Panel',
         
    layout'fit',
         
    items: {
          
    xtype'grid',
          
    title'Grid',
          
    storestates,
          
    columns:[
           { 
    name'abbr'text'abbr'dataIndex'abbr' }, { name'name'text'name'dataIndex'name' }
          ],
          
    tbar: {
           
    xtype'toolbar',
           
    items: [{
            
    text'show win',
            
    handler: function(){
             var 
    win Ext.widget('window', {
              
    width600,
              
    height400,
              
    modaltrue,
              
    buttons: [
               {
                
    text'close win',
                
    handler: function(){
                 
    win.close();
                 
    /*
                 var f=function(){
                  win.close();
                 }
                 Ext.Function.defer(f, 100);
                 */
                
    }
               }
              ]
             });
             
    win.show();
            }
           }]
          }
         }
        });
       }); 
    A simple workaround is to defer the win.close execution, see Ext.Function.defer(f, 100);

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,166
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I can't reproduce this. I clicked open/close around 20 times and didn't receive any exceptions.

    How do I go about getting the error to throw?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    Hi evant, please try to hover the grid headers inmediately after clicking "show win", then when you click "close win" you got the exception.

    Is hard to reproduce on FF but it happens, you can try this in IE8 and you ever got the exception.

    Here are sbugFF.pngobugIE8.pngme screens

    Thanks

    Quote Originally Posted by evant View Post
    I can't reproduce this. I clicked open/close around 20 times and didn't receive any exceptions.

    How do I go about getting the error to throw?

  4. #4
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    Same problem with card layout and grid.

    Click "goto item 1" and then "goto item 0", very easy to reproduce in IE

    Thanks

    Code:
    PHP Code:
       Ext.onReady(function(){
        var 
    states Ext.create('Ext.data.Store', {
            
    autoLoadtrue,
         
    fields: ['abbr''name'],
            
    data : [
                {
    "abbr":"AL""name":"Alabama"},
                {
    "abbr":"AK""name":"Alaska"},
                {
    "abbr":"AZ""name":"Arizona"}
                
    //...
            
    ]
        });
        
        var 
    pnl Ext.widget('panel', {
         
    renderTodocument.body,
         
    width600,
         
    height400,
         
    title'card layout',
         
    layout'card',
         
    activeItem0,
         
    items: [{
             
    xtype'grid',
             
    title'testing grid at card 0',
             
    storestates,
          
    columns:[
           { 
    name'abbr'text'abbr'dataIndex'abbr' }, { name'name'text'name'dataIndex'name' }
          ],
          
    tbar: [{
              
    text'Goto item 1',
              
    handler: function(){
            
    pnl.getLayout().setActiveItem(1);
           }
          }]
         },{
             
    items: {
              
    xtype'panel',
              
    title'testing panel at card 1',
              
    html'testing content',
              
    tbar: [{
               
    text'Goto item 0',
               
    handler: function(){
                
    pnl.getLayout().setActiveItem(0);
                
    pnl.remove(1true);
            }
           }]
          }
         }]
        });
       }); 

  5. #5
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    27
    ykey has a spectacular aura about ykey has a spectacular aura about

      0  

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,166
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I tried your code against B3 and the latest from source and wasn't able to reproduce it in any browser.

    Can anyone confirm?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    27
    ykey has a spectacular aura about ykey has a spectacular aura about

      0  

    Default


    Yes able to verify both examples in FF4 and Chrome 10 in B3.

  8. #8
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    27
    ykey has a spectacular aura about ykey has a spectacular aura about

      0  

    Default


    Uncaught TypeError: Cannot read property 'style' of undefined
    Ext.override.getStyle.view.view.getComputedStyle.el ext-core-debug.js:13037
    Ext.override.isStyle ext-core-debug.js:13019
    isVisible ext-core-debug.js:18867
    anonymous:2
    filterItems ComponentQuery.js:105
    cq.Query.Ext.extend.is ComponentQuery.js:313
    Ext.apply.is ComponentQuery.js:416
    Ext.apply.focusable.is FocusableFocusManager.js:168
    Ext.apply.focusable FocusManager.js:173
    filterByPseudo ComponentQuery.js:206
    filterItems ComponentQuery.js:105
    cq.Query.Ext.extend.is ComponentQuery.js:313
    Ext.apply.is ComponentQuery.js:416
    Ext.define.on ComponentFocusFocusManager.js:484
    (anonymous function) ext-core-debug.js:2093

  9. #9
    Sencha User
    Join Date
    Apr 2011
    Posts
    13
    Vote Rating
    0
    dmN86 is on a distinguished road

      0  

    Default


    Hi,

    Sorry form my bad english

    I have same problem.
    I was working with MVC examples, and when I was closing window:
    "Uncaught TypeError: Cannot read property 'style' of undefined"

    Chrome 10.0.648.205

    Same issue on example "feed-viewer" - try click "Cancel" on Add feed window

  10. #10
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    Exactly, thanks guys for reporting too, i've redownloaded the B3 and still getting the error on win764/w2k/wXP FF and IE

    here is the complete html (maybe it's usefull)
    PHP Code:
    <html>
     <
    head>
      <
    link rel="stylesheet" type="text/css" href="ext-4.0-beta3/resources/css/ext-all.css" />
      <
    script type="text/javascript" src="ext-4.0-beta3/ext-all-debug.js"></script>
      <script type="text/javascript">
       Ext.onReady(function(){
        var states = Ext.create('Ext.data.Store', {
            autoLoad: true,
         fields: ['abbr', 'name'],
            data : [
                {"abbr":"AL", "name":"Alabama"},
                {"abbr":"AK", "name":"Alaska"},
                {"abbr":"AZ", "name":"Arizona"}
                //...
            ]
        });
        var view = Ext.widget('viewport',{
         layout: 'fit',
         items: {
          xtype: 'grid',
          title: 'Grid',
          store: states,
          columns:[
           { name: 'abbr', text: 'abbr', dataIndex: 'abbr' }, { name: 'name', text: 'name', dataIndex: 'name' }
          ],
          tbar: {
           xtype: 'toolbar',
           items: [{
            text: 'show win',
            handler: function(){
             var win = Ext.widget('window', {
              width: 600,
              height: 400,
              modal: true,
              buttons: [
               {
                text: 'close win',
                handler: function(){
                 win.close();
                 /*
                 var f=function(){
                  win.close();
                 }
                 Ext.Function.defer(f, 100);
                 */
                }
               }
              ]
             });
             win.show();
            }
           }]
          }
         }
        });
       });
      </script>
     </head>
     <body>
     </body>
    </html> 

Similar Threads

  1. Wind show body mask unmask on window close
    By vishalnnsingh in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 15 Sep 2010, 1:15 AM
  2. show alert window on tab close
    By rajeshin in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 24 Aug 2008, 1:37 PM
  3. Show() doesn't rerender window after close() is called
    By bluesapphire in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 18 Aug 2008, 5:23 AM
  4. Replies: 2
    Last Post: 19 Mar 2008, 6:16 AM
  5. [2.0][CLOSED] close/destroy window having forms
    By ludoo in forum Ext 2.x: Bugs
    Replies: 6
    Last Post: 7 Dec 2007, 6:13 AM

Thread Participants: 3