Results 1 to 3 of 3

Thread: Window Forms inside Tabpanel remain visible after closing the tab

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    22
    Vote Rating
    0
      0  

    Default Unanswered: Window Forms inside Tabpanel remain visible after closing the tab

    Hi, I'am new to extjs, so I'am not sure if its a bug or not so I posted it here.

    I have Tabpanel, each Tab has gridpanel inside with buttons that will pop-up window forms(modal is set to true).
    Main view.png


    My problem is that when there is only one Tabpanel item and try to close the Tab while window form is still active/open/showing, the window form and its modal mask remain visible (suppose to be deleted together with its container)

    2 Add Window Form.png4 Bug.png

    I hope you can help me fix this, Thanks in advance
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    58
    Answers
    3
    Vote Rating
    6
      1  

    Default

    You could use the beforedestroy event to check if your window is showing

    Code:
    listeners: {
        beforedestroy: function() {
             if(window = Ext.getCmp('userWindow'))
                 window.destroy();
        }
    }

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    22
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by WillBill View Post
    You could use the beforedestroy event to check if your window is showing

    Code:
    listeners: {
        beforedestroy: function() {
             if(window = Ext.getCmp('userWindow'))
                 window.destroy();
        }
    }
    thanks for the reply mate. but it seems that closing the tab doesn't fire the destroy/beforedestroy event,
    anyway thank you for the idea. I appreciate your help

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
  •