From: Felix Nagel Date: Sat, 31 Aug 2013 01:09:57 +0000 (+0200) Subject: Selectmenu: update button text when selected option is added X-Git-Tag: 1.11.0-beta.1~160^2~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67f04e4e42e67c1b73a97efc1c46cf986cec4794;p=jquery-ui.git Selectmenu: update button text when selected option is added --- diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index bc7eae1bd..6685229d5 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -179,6 +179,8 @@ $.widget( "ui.selectmenu", { // Make sure menu is selected item aware this.menu.menu( "focus", null, item ); this._setAria( item.data( "ui-selectmenu-item" ) ); + + this._setText( this.buttonText, item.text() ); // Set disabled state this._setOption( "disabled", !!this.element.prop( "disabled" ) );