Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error.

This commit is contained in:
Scott González 2010-07-16 11:48:40 -04:00
parent 60dc67400e
commit 70481d9feb

View File

@ -196,7 +196,7 @@ $.widget( "ui.button", {
// we don't search against the document in case the element
// is disconnected from the DOM
this.buttonElement = this.element.parents().last()
.find( "[for=" + this.element.attr("id") + "]" );
.find( "label[for=" + this.element.attr("id") + "]" );
this.element.addClass( "ui-helper-hidden-accessible" );
var checked = this.element.is( ":checked" );