mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Selectmenu: Use $.ui.escapeSelector
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user