File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ jQuery.support = (function() {
131131 support . radioValue = input . value === "t" ;
132132
133133 input . setAttribute ( "checked" , "checked" ) ;
134+
135+ // #11217 - WebKit loses check when the name is after the checked attribute
136+ input . setAttribute ( "name" , "t" ) ;
137+
134138 div . appendChild ( input ) ;
135139 fragment = document . createDocumentFragment ( ) ;
136140 fragment . appendChild ( div . lastChild ) ;
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ test("unwrap()", function() {
265265} ) ;
266266
267267var testAppend = function ( valueObj ) {
268- expect ( 41 ) ;
268+ expect ( 46 ) ;
269269 var defaultText = "Try them out:"
270270 var result = jQuery ( "#first" ) . append ( valueObj ( "<b>buga</b>" ) ) ;
271271 equal ( result . text ( ) , defaultText + "buga" , "Check if text appending works" ) ;
@@ -317,6 +317,12 @@ var testAppend = function(valueObj) {
317317 ok ( jQuery ( this ) . is ( ":checked" ) , "Append HTML5-formated checked radio" ) ;
318318 } ) . remove ( ) ;
319319
320+ QUnit . reset ( ) ;
321+ jQuery ( "form" ) . append ( valueObj ( "<input type='radio' checked='checked' name='radiotest' />" ) ) ;
322+ jQuery ( "form input[name=radiotest]" ) . each ( function ( ) {
323+ ok ( jQuery ( this ) . is ( ":checked" ) , "Append with name attribute after checked attribute" ) ;
324+ } ) . remove ( ) ;
325+
320326 QUnit . reset ( ) ;
321327 jQuery ( "#sap" ) . append ( valueObj ( document . getElementById ( "form" ) ) ) ;
322328 equal ( jQuery ( "#sap>form" ) . size ( ) , 1 , "Check for appending a form" ) ; // Bug #910
You can’t perform that action at this time.
0 commit comments