From 20466d50277712050b4e403686a9df16b5eca4e9 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 10 Feb 2016 11:31:03 -0500 Subject: Selectmenu: Fixed selectmenu icon float right Also removes the icon space as its not needed with a floated icon Fixes #14914 Closes gh-1671 --- ui/widgets/selectmenu.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ui') 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 = $( "" ).prependTo( this.button ); - space = $( " " ); - 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 = $( "" ).appendTo( this.button ); + this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button ); + if ( this.options.width !== false ) { this._resizeButton(); } -- cgit v1.2.3