aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/widgets/selectmenu.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/widgets/selectmenu.js b/ui/widgets/selectmenu.js
index b251f04f1..fa7f87e94 100644
--- a/ui/widgets/selectmenu.js
+++ b/ui/widgets/selectmenu.js
@@ -84,7 +84,7 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
},
_drawButton: function() {
- var icon, space,
+ var icon,
that = this,
item = this._parseOption(
this.element.find( "option:selected" ),
@@ -119,15 +119,12 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
"ui-button ui-widget" );
- icon = $( "<span>" ).prependTo( this.button );
- space = $( "<span> </span>" );
- this._addClass( space, "ui-selectmenu-icon-space" );
- this._addClass( icon, null, "ui-icon " + this.options.icons.button );
- icon.after( space );
-
this.buttonItem = this._renderButtonItem( item )
.appendTo( this.button );
+ icon = $( "<span>" ).appendTo( this.button );
+ this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
+
if ( this.options.width !== false ) {
this._resizeButton();
}