From: Scott González Date: Fri, 16 Jul 2010 15:48:40 +0000 (-0400) Subject: Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error. X-Git-Tag: 1.8.3~38^2~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=70481d9febd1b904577d2d5f4345e5a0e79a59f7;p=jquery-ui.git Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error. --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index db8c8b27b..b2fab4d24 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -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" );