r2811 - Removed a portion of the logic for toggling _safeMouseup and adjusted the button timer to...
Author: scottjehl
Date: Thu Jun 18 14:33:31 2009
New Revision: 2811
Modified:
branches/labs/selectmenu/ui.selectmenu.js
Log:
Removed a portion of the logic for toggling _safeMouseup and adjusted the
button timer to be shorter.
Modified: branches/labs/selectmenu/ui.selectmenu.js
==============================================================================
--- branches/labs/selectmenu/ui.selectmenu.js (original)
+++ branches/labs/selectmenu/ui.selectmenu.js Thu Jun 18 14:33:31 2009
@@ -53,7 +53,7 @@
//make sure a click won't open/close instantly
if(o.style == "popup"){
self._safemouseup = false;
- setTimeout(function(){self._safemouseup = true;}, 500);
+ setTimeout(function(){self._safemouseup = true;}, 300);
}
return false;
})
@@ -152,10 +152,6 @@
self._selectedOptionLi().addClass(activeClass);
self._focusedOptionLi().removeClass(self.widgetBaseClass+'-item-focus
ui-state-hover');
$(this).removeClass('ui-state-active').addClass(self.widgetBaseClass
+ '-item-focus ui-state-hover');
- //if it's a popup menu, if the hovered item isn't selected, let the
mouseup event fire
- if(o.style == "popup" && !$(this).is(self._selectedOptionLi())){
- self._safemouseup = true;
- }
})
.bind('mouseout blur', function(){
if($(this).is( self._selectedOptionLi() )){
$(this).addClass(activeClass); }