[FIXED] [#758] [3.2.0] Ext.menu.Menu and preventClick method exception

  1. #1

    [FIXED] [#758] [3.2.0] Ext.menu.Menu and preventClick method exception

    Hi,

    Please use following example to reproduce problem:

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>DropDownMenu</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Viewport
            runat="server"
            Layout="BorderLayout">
            <Items>
                <ext:Panel runat="server" Region="North">
                    <TopBar>
                        <ext:Toolbar
                            runat="server">
                            <Items>
                                <ext:ToolbarFill runat="server" />
                                <ext:Button runat="server" Text="User">
                                    <Menu>
                                        <ext:Menu
                                            runat="server">
                                            <Items>
                                                <ext:MenuItem runat="server" Text="My Settings" />
                                                <ext:MenuSeparator />
                                                <ext:MenuItem runat="server" Text="Logout" />
                                            </Items>
                                        </ext:Menu>
                                    </Menu>
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                </ext:Panel>
            </Items>
        </ext:Viewport>
    </body>
    </html>

    Steps to reproduce:

    1. Open drop down menu "User"
    2. Hoover over "My Settings" menu
    3. Click and hold left mouse button
    4. Holding left mouse button hoover over e.g. "Logout" menu
    5. Release left mouse button



    Please check if the patch is OK or please let me know if you can change something inside getItemFromEvent so it always return the "item" and href can be checked.


    Ext.menu.Menu.override({
    
        preventClick: function (e) {
            var item = this.getItemFromEvent(e);
    
            if (!item || !item.href) {
                e.preventDefault();
            }
        }
    });

    Thank you,
    Last edited by Daniil; Jun 23, 2015 at 2:19 PM. Reason: [FIXED] [#758] [3.2.0]
  2. #2
    Hi Matt,

    Thank you for the report!

    It is probably fixed already in the latest ExtJS:
    http://www.sencha.com/forum/showthread.php?298002

    Probably, almost in the same way as you did. So, your patch might be considered as approved by Sencha:)

    Created an Issue to track the defect:
    https://github.com/extnet/Ext.NET/issues/758

    It should be fixed with the next ExtJS upgrade.
  3. #3
    Thanks Danill,

    Sorry for repeating Sencha's reported bugs... sometimes "I go with the flow" :). Next time I'll will try check there first.

    Best Regards,

    Matt
  4. #4
    It has been fixed in ExtJS 5.1.1 and we recently incorporated it into SVN trunk.

    The fix will also go to the upcoming Ext.NET 3.2.0 release.
  5. #5
    Thank you,

    Once released I will confirm and then we close this one.

Similar Threads

  1. Replies: 4
    Last Post: Mar 04, 2014, 2:20 PM
  2. [CLOSED] Dynamic menu items in menu panel creation problem
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 10, 2013, 10:29 AM
  3. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  4. Replies: 0
    Last Post: Mar 29, 2012, 12:50 PM
  5. [FIXED] [V0.7] Menu Exception
    By Timothy in forum Bugs
    Replies: 13
    Last Post: Dec 02, 2008, 2:39 PM

Tags for this Thread

Posting Permissions