Revert "Menu: Make check for click outside of menu a function which can be overridden. Fixes #8929 - Menu needs adjustement for use in Selectmenu"

This reverts commit 2a7896ec3e.
This commit is contained in:
Scott González 2013-12-16 09:05:19 -05:00
parent e5e286ef4e
commit 2135008d2c

View File

@ -131,7 +131,7 @@ $.widget( "ui.menu", {
// Clicks outside of a menu collapse any open menus
this._on( this.document, {
click: function( event ) {
if ( this._closeOnDocumentClick( event ) ) {
if ( !$( event.target ).closest( ".ui-menu" ).length ) {
this.collapseAll( event );
}
@ -498,10 +498,6 @@ $.widget( "ui.menu", {
.removeClass( "ui-state-active" );
},
_closeOnDocumentClick: function( event ) {
return !$( event.target ).closest( ".ui-menu" ).length;
},
collapse: function( event ) {
var newItem = this.active &&
this.active.parent().closest( ".ui-menu-item", this.element );