aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets')
-rw-r--r--ui/widgets/controlgroup.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/widgets/controlgroup.js b/ui/widgets/controlgroup.js
index 536d480f9..ceb78c7c3 100644
--- a/ui/widgets/controlgroup.js
+++ b/ui/widgets/controlgroup.js
@@ -61,6 +61,12 @@ return $.widget( "ui.controlgroup", {
this._callChildMethod( "destroy" );
this.childWidgets.removeData( "ui-controlgroup-data" );
this.element.removeAttr( "role" );
+ if ( this.options.items.controlgroupLabel ) {
+ this.element
+ .find( this.options.items.controlgroupLabel )
+ .find( ".ui-controlgroup-label-contents" )
+ .contents().unwrap();
+ }
},
_initWidgets: function() {
@@ -72,8 +78,8 @@ return $.widget( "ui.controlgroup", {
var labels;
var options = {};
- // Make sure the widget actually exists and has a selector set
- if ( !$.fn[ widget ] || !selector ) {
+ // Make sure the widget has a selector set
+ if ( !selector ) {
return;
}
@@ -87,6 +93,11 @@ return $.widget( "ui.controlgroup", {
return;
}
+ // Make sure the widget actually exists
+ if ( !$.fn[ widget ] ) {
+ return;
+ }
+
// We assume everything is in the middle to start because we can't determine
// first / last elements until all enhancments are done.
if ( that[ "_" + widget + "Options" ] ) {