[CLOSED] [#16] Problem width Ext.Msg.show in BeforeClose event of Panel

  1. #1

    [CLOSED] [#16] Problem width Ext.Msg.show in BeforeClose event of Panel

    Goodafternoon,
    in my attached example I have a problem:
    when the page appears, if I press button "test" for first and later I press the tab close button then the messagebox appears but if I immediately press the tab close button then the messagebox in IE is too small and unusable and in Chrome is only unusable.
    Thank you.

    <%@ Page Language="C#" %>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        
        <script type="text/javascript" language="javascript">
    
    
          var onCloseTab = function (panel, eOpts) {
    
    
            Ext.Msg.show({
              title: "Attention",
              msg: "Test onBeforeClose",
              width: 300,
              icon: Ext.Msg.QUESTION,
              buttons: Ext.Msg.YESNO,
              minWidth: 290,
              animateTarget: "TabPanel1"
    
    
            });
    
    
            return false;
    
    
          }
    
    
          var msgBoxShow = function () {
    
    
            Ext.Msg.show({
              title: "Test",
              msg: "onClick",
              width: 300,
              icon: Ext.Msg.QUESTION,
              buttons: Ext.Msg.YESNO,
              minWidth: 290,
              multiline: false
            });
    
    
          }
    
    
        </script>
    
    
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <br />
            
            <ext:Button id="btnTestMsg" runat="server" Text="test">
              <Listeners>
                <Click Handler="msgBoxShow();" />
              </Listeners>
            </ext:Button>
    
    
            <br />
    
    
            <div>
                <ext:TabPanel 
                    ID="TabPanel1" 
                    runat="server" 
                    ActiveTabIndex="0" 
                    Width="600" 
                    Height="250" 
                    Plain="true">
                    <Items>
                       
                        <ext:Panel 
                            ID="Tab2" 
                            runat="server" 
                            Title="Closable Tab" 
                            Html="You can close this Tab."
                            BodyPadding="6" 
                            Closable="true">
                            <Listeners>
                                <BeforeClose Fn="onCloseTab" />
                            </Listeners>
                            
                        </ext:Panel>
                       
                        
                    </Items>
                </ext:TabPanel>
            </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Dec 29, 2012 at 9:40 AM. Reason: [CLOSED]
  2. #2
    Hi Jimmy,

    Thank you for the report. It is a known ExtJS issue.
    http://www.sencha.com/forum/showthread.php?197911

    For now, we can suggest to remove the "animationTarget" option or defer showing a message box.

    Example
    var onCloseTab = function () {
        Ext.defer(function () {
            Ext.Msg.show({
                title: "Attention",
                msg: "Test onBeforeClose",
                width: 300,
                icon: Ext.Msg.QUESTION,
                buttons: Ext.Msg.YESNO,
                minWidth: 290,
                animateTarget: "TabPanel1"
            });
        }, 10);
     
        return false;
    };
    Last edited by Daniil; Sep 28, 2012 at 4:03 PM.
  3. #3
    Thank you Daniil,
    with defer the Msg.show works fine.

    Jimmy
  4. #4
    Opened an Isssue to track this defect, see

    https://github.com/extnet/Ext.NET/issues/16
    Geoffrey McGill
    Founder & CEO
  5. #5
    Hi Jimmy,

    The bug appears to be not reproducible with the trunk. So, I am marking the thread as closed.

    Testing your initial example you might notice a problem with a mask. An Issue for that problem has been already created.
    https://github.com/extnet/Ext.NET/issues/99

Similar Threads

  1. [CLOSED] Panel Show event not fired
    By feanor91 in forum 2.x Premium Help
    Replies: 6
    Last Post: May 03, 2012, 8:41 AM
  2. Replies: 1
    Last Post: Oct 26, 2011, 7:17 AM
  3. Replies: 6
    Last Post: Oct 04, 2011, 7:29 PM
  4. [CLOSED] Trigger with Grid Panel Show Mask Problem
    By speedstepmem3 in forum 1.x Premium Help
    Replies: 1
    Last Post: May 11, 2010, 2:37 PM
  5. Show a panel on click event
    By CoolNoob in forum 1.x Help
    Replies: 2
    Last Post: Jan 01, 2010, 3:27 PM

Posting Permissions