From 70481d9febd1b904577d2d5f4345e5a0e79a59f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 16 Jul 2010 11:48:40 -0400 Subject: [PATCH] Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error. --- ui/jquery.ui.button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ); -- 2.39.5