From: ddstreet Date: Fri, 11 Mar 2011 15:52:13 +0000 (-0500) Subject: Button: find associated label even without common ancestor. Fixes #7092 - button... X-Git-Tag: 1.8.11~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d6ad068733a18e5b69815192e7c0f5614410c56;p=jquery-ui.git Button: find associated label even without common ancestor. Fixes #7092 - button creation that requires a matching label does not find label in all cases (cherry picked from commit 0b30a1d450f6b7d529732d6a39c5f4057efaaaf4) --- diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js index 5c5053ded..79bbfeb5c 100644 --- a/tests/unit/button/button_tickets.js +++ b/tests/unit/button/button_tickets.js @@ -20,4 +20,26 @@ test( "#6262 - buttonset not applying ui-corner to invisible elements", function ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) ); }); +test( "#7092 - button creation that requires a matching label does not find label in all cases", function() { + var group = $( "" ); + group.find( "input:checkbox" ).button(); + ok( group.find( "label" ).is( ".ui-button" ) ); + + group = $( "