Skip to content
Permalink
Browse files

Selectmenu: Use $.ui.escapeSelector

  • Loading branch information
arschmitz committed Apr 27, 2015
1 parent 803eaf2 commit 737b690cde0ee5b04679a4433bc2da41944d1edf
Showing with 3 additions and 2 deletions.
  1. +3 −2 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 );
}
}

0 comments on commit 737b690

Please sign in to comment.
You can’t perform that action at this time.