]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: focus problem when toggle menu, thx to phazei for reporting this issue, see...
authorFelix Nagel <info@felixnagel.com>
Mon, 29 Nov 2010 00:46:38 +0000 (01:46 +0100)
committerFelix Nagel <info@felixnagel.com>
Mon, 29 Nov 2010 00:46:38 +0000 (01:46 +0100)
ui/jquery.ui.selectmenu.js

index d160f28d85b9a0c8a89b845e15889c249a23ec88..73292c7f4379d45aa2ab0d9ab010fcdff0dbd975 100644 (file)
@@ -71,7 +71,7 @@ $.widget("ui.selectmenu", {
                //click toggle for menu visibility
                this.newelement
                        .bind('mousedown', function(event){
-                               self._toggle(event);
+                               self._toggle(event, true);
                                //make sure a click won't open/close instantly
                                if(o.style == "popup"){
                                        self._safemouseup = false;
@@ -416,7 +416,9 @@ $.widget("ui.selectmenu", {
                                .attr('aria-hidden', true)
                                .removeClass(this.widgetBaseClass+'-open');
                        if(this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); }
-                       if(retainFocus){this.newelement[0].focus();}    
+                       console.log(this.newelement);
+                       console.log(this.retainFocus);
+                       if(retainFocus){this.newelement.focus();}       
                        this._trigger("close", event, this._uiHash());
                }
        },