From f2228b0553b2cd6bebd0882f5928c19a2d1b3d09 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sun, 26 Feb 2012 01:50:55 +0100 Subject: Selectmenu: remove unwanted Menu mouseover event, fixes problem with selected item highlighting on menu open --- ui/jquery.ui.selectmenu.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 1f6e057e7..8193783c7 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -163,9 +163,10 @@ $.widget( "ui.selectmenu", { // change menu styles? if ( this.options.dropdown ) { this.menu.addClass( 'ui-corner-bottom' ).removeClass( 'ui-corner-all' ); - } + } - // unbind Menu document event + // unbind uneeded Menu events + this.menu.unbind ( "mouseleave.menu" ); $( document ).unbind( "click.menu" ); }, @@ -409,7 +410,7 @@ $.widget( "ui.selectmenu", { this.menu.attr("aria-hidden", !this.isOpen); this.button.attr("aria-expanded", this.isOpen); }, - + _getCreateOptions: function() { return { disabled: !!this.element.attr( 'disabled' ) }; }, -- cgit v1.2.3