aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2016-02-10 11:31:03 -0500
committerAlexander Schmitz <arschmitz@gmail.com>2016-02-24 11:29:44 -0500
commit20466d50277712050b4e403686a9df16b5eca4e9 (patch)
treea867e38c14ac2cc0a10e991e10c0da3969f39ef6 /ui
parent8564641fb8dcff3f072106b075a1bdb1f16ec63d (diff)
downloadjquery-ui-20466d50277712050b4e403686a9df16b5eca4e9.tar.gz
jquery-ui-20466d50277712050b4e403686a9df16b5eca4e9.zip
Selectmenu: Fixed selectmenu icon float right
Also removes the icon space as its not needed with a floated icon Fixes #14914 Closes gh-1671
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();
}