diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-04-11 13:49:22 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-04-11 13:49:22 -0400 |
commit | bc65675330e758c406098e929ee8b4c1741c87fd (patch) | |
tree | 83c5c780641fe9489e85168a628b42a539aee3d1 /ui | |
parent | a3370064d85b30d89846efde00e461a2d493dfda (diff) | |
download | jquery-ui-bc65675330e758c406098e929ee8b4c1741c87fd.tar.gz jquery-ui-bc65675330e758c406098e929ee8b4c1741c87fd.zip |
Tabs: Fixed issues with collapsible and active options.
Diffstat (limited to 'ui')
-rwxr-xr-x | ui/jquery.ui.tabs.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 646854f49..699c1a5ee 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -78,6 +78,11 @@ $.widget( "ui.tabs", { } options.active = active; + // don't allow collapsible: false and active: false + if ( !options.collapsible && options.active === false ) { + options.active = 0; + } + // Take disabling tabs via class attribute from HTML // into account and update option properly. if ( $.isArray( options.disabled ) ) { @@ -123,6 +128,11 @@ $.widget( "ui.tabs", { return; } + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + this.options[ key ] = value; this.refresh(); }, |