mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
Selectmenu: Use $.ui.escapeSelector
This commit is contained in:
parent
803eaf29f7
commit
737b690cde
@ -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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user