r2819 - cleaned up focus state in the closeOthers method
Author: scottjehl
Date: Fri Jun 19 08:39:31 2009
New Revision: 2819
Modified:
branches/labs/selectmenu/ui.selectmenu.js
Log:
cleaned up focus state in the closeOthers method
Modified: branches/labs/selectmenu/ui.selectmenu.js
==============================================================================
--- branches/labs/selectmenu/ui.selectmenu.js (original)
+++ branches/labs/selectmenu/ui.selectmenu.js Fri Jun 19 08:39:31 2009
@@ -358,7 +358,7 @@
},
close: function(event, retainFocus){
if(this.newelement.is('.ui-state-active')){
- this.newelement.removeClass('ui-state-active ui-state-hover');
+ this.newelement.removeClass('ui-state-active');
this.list.removeClass(this.widgetBaseClass+'-open');
if(this.options.style == "dropdown"){
this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); }
if(retainFocus){this.newelement.focus();}
@@ -375,7 +375,8 @@
_closeOthers: function(event){
$('.'+ this.widgetBaseClass
+'.ui-state-active').not(this.newelement).each(function(){
$(this).data('selectelement').selectmenu('close',event);
- })
+ });
+ $('.'+ this.widgetBaseClass +'.ui-state-hover').trigger('mouseout');
},
_toggle: function(event,retainFocus){
if(this.list.is('.'+ this.widgetBaseClass +'-open')){
this.close(event,retainFocus); }