]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error.
authorScott González <scott.gonzalez@gmail.com>
Fri, 16 Jul 2010 15:48:40 +0000 (11:48 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 16 Jul 2010 15:48:40 +0000 (11:48 -0400)
ui/jquery.ui.button.js

index db8c8b27bff22a84e5366b9d1b0096b0a7222efe..b2fab4d2452dabd4c0f09c8aa5db55de8886ed4d 100644 (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" );