]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Fixed selected tab detection.
authorScott González <scott.gonzalez@gmail.com>
Sat, 6 Feb 2010 03:27:09 +0000 (03:27 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sat, 6 Feb 2010 03:27:09 +0000 (03:27 +0000)
Fixes #5122 - Bug in ui.tabs.

Thanks th3br41n.

ui/jquery.ui.tabs.js

index a9f6b8ea45ba89c8ab56bb8ab80bc880213fa7e8..e7cfa10a1f4ae144432067b59650cf43a2b30d86 100644 (file)
@@ -169,7 +169,7 @@ $.widget("ui.tabs", {
                                if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
                                        o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
                                }
-                               o.selected = o.selected || this.lis.length ? 0 : -1;
+                               o.selected = o.selected || (this.lis.length ? 0 : -1);
                        }
                        else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
                                o.selected = -1;