diff options
author | Felix Nagel <info@felixnagel.com> | 2013-06-24 20:28:10 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-06-24 20:28:10 +0200 |
commit | 9992d4626eca1182c9688190ff5642168f2490ec (patch) | |
tree | 41bc8629a8c8e3c133bfe4de4fae1da1d6202f90 /ui/jquery.ui.menu.js | |
parent | ab72fd16667cf08cadc0bf8b3375622b0d74d81a (diff) | |
parent | fe9f6ca98634dd82c3cdb907d725c42f97afe951 (diff) | |
download | jquery-ui-9992d4626eca1182c9688190ff5642168f2490ec.tar.gz jquery-ui-9992d4626eca1182c9688190ff5642168f2490ec.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 1c641ebb6..c0222629d 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -282,6 +282,8 @@ $.widget( "ui.menu", { icon = this.options.icons.submenu, submenus = this.element.find( this.options.menus ); + this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ); + // Initialize nested menus submenus.filter( ":not(.ui-menu)" ) .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) @@ -387,7 +389,7 @@ $.widget( "ui.menu", { } nested = item.children( ".ui-menu" ); - if ( nested.length && ( /^mouse/.test( event.type ) ) ) { + if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { this._startOpening(nested); } this.activeMenu = item.parent(); |