Skip to content

Commit 5435c50

Browse files
committed
Tabs: Fixed select method handling for index of -1.
1 parent 7e03d4e commit 5435c50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ui/jquery.ui.tabs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,12 @@ $.widget("ui.tabs", {
575575

576576
select: function(index) {
577577
index = this._getIndex(index);
578-
if (index == -1 && this.options.collapsible) {
579-
index = this.options.selected;
578+
if (index == -1) {
579+
if (this.options.collapsible && this.options.selected != -1) {
580+
index = this.options.selected;
581+
} else {
582+
return this;
583+
}
580584
}
581585
this.anchors.eq(index).trigger(this.options.event + '.tabs');
582586
return this;

0 commit comments

Comments
 (0)