aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2010-11-29 01:46:38 +0100
committerFelix Nagel <info@felixnagel.com>2010-11-29 01:46:38 +0100
commit8f802c97ce70d4a68b40227b8a2b54b7fcfdcefc (patch)
treec4299aec3ba728c7692f65f8a34ac7593b9eb048
parentcc6290c6f8cbec4a36556a0e7c7cb69b23ad2a6c (diff)
downloadjquery-ui-8f802c97ce70d4a68b40227b8a2b54b7fcfdcefc.tar.gz
jquery-ui-8f802c97ce70d4a68b40227b8a2b54b7fcfdcefc.zip
fixed: focus problem when toggle menu, thx to phazei for reporting this issue, see https://github.com/fnagel/jquery-ui/issues#issue/22
-rw-r--r--ui/jquery.ui.selectmenu.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index d160f28d8..73292c7f4 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -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());
}
},