r2767 - close method blurs control if no arg is passed

r2767 - close method blurs control if no arg is passed


Author: scottjehl
Date: Mon Jun 15 09:03:27 2009
New Revision: 2767
Modified:
branches/labs/selectmenu/ui.selectmenu.js
Log:
close method blurs control if no arg is passed
Modified: branches/labs/selectmenu/ui.selectmenu.js
==============================================================================
--- branches/labs/selectmenu/ui.selectmenu.js    (original)
+++ branches/labs/selectmenu/ui.selectmenu.js    Mon Jun 15 09:03:27 2009
@@ -75,7 +75,7 @@
                    
self.list.find('li.ui-selectmenu-item-selected').next().trigger('mouseup');    
                    break;    
                case $.ui.keyCode.TAB:
-                    setTimeout(function(){ self.newelement.blur(); }, 10);
+                    self.newelement.blur();
                    break;    
                default:
                    ret = false;
@@ -317,6 +317,7 @@
        this.list.removeClass('ui-selectmenu-open');
        if(this.options.style == "dropdown"){
this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); }
        if(retainFocus){this.newelement.focus();}    
+        else{ self.newelement.blur(); }
        return this.element;
    },