diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-04-27 02:30:01 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-05 21:43:57 -0400 |
commit | 737b690cde0ee5b04679a4433bc2da41944d1edf (patch) | |
tree | 21cd0b425d2f8df4075700da79c07d2978768a8d /ui | |
parent | 803eaf29f732a68793b806356096fe849b9f470b (diff) | |
download | jquery-ui-737b690cde0ee5b04679a4433bc2da41944d1edf.tar.gz jquery-ui-737b690cde0ee5b04679a4433bc2da41944d1edf.zip |
Selectmenu: Use $.ui.escapeSelector
Diffstat (limited to 'ui')
-rw-r--r-- | ui/selectmenu.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/selectmenu.js b/ui/selectmenu.js index dad7a1b40..db2cea712 100644 --- a/ui/selectmenu.js +++ b/ui/selectmenu.js @@ -90,7 +90,7 @@ return $.widget( "ui.selectmenu", { ); // Associate existing label with the new button - this.labels = this.element.labels(); + this.labels = this.element.labels().attr( "for", this.ids.button ); this._on( this.labels, { click: function( event ) { this.button.focus(); @@ -423,7 +423,8 @@ return $.widget( "ui.selectmenu", { return; } - if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) { + if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + + $.ui.escapeSelector( this.ids.button ) ).length ) { this.close( event ); } } |