Skip to content

Commit 70481d9

Browse files
committed
Button: Restrict DOM querying to labels. Fixes #5810 - Buttonset and applet error.
1 parent 60dc674 commit 70481d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.button.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ $.widget( "ui.button", {
196196
// we don't search against the document in case the element
197197
// is disconnected from the DOM
198198
this.buttonElement = this.element.parents().last()
199-
.find( "[for=" + this.element.attr("id") + "]" );
199+
.find( "label[for=" + this.element.attr("id") + "]" );
200200
this.element.addClass( "ui-helper-hidden-accessible" );
201201

202202
var checked = this.element.is( ":checked" );

0 commit comments

Comments
 (0)