]> source.dussan.org Git - jquery.git/commitdiff
Fix support test for checkClone. Fixes Safari 5.1 manip failures.
authorTimmy Willison <timmywillisn@gmail.com>
Wed, 11 Sep 2013 14:51:31 +0000 (09:51 -0500)
committerTimmy Willison <timmywillisn@gmail.com>
Wed, 11 Sep 2013 19:31:06 +0000 (14:31 -0500)
Conflicts:
src/manipulation.js

src/manipulation.js
src/manipulation/support.js

index 0094b279af8b12e5eae9a960d383912b40e9369e..b19edfa3aa5a122b2189c51a96a8c9893e4f1e83 100644 (file)
@@ -655,7 +655,9 @@ jQuery.fn.extend({
                        isFunction = jQuery.isFunction( value );
 
                // We can't cloneNode fragments that contain checked, in WebKit
-               if ( isFunction || !( l <= 1 || typeof value !== "string" || support.checkClone || !rchecked.test( value ) ) ) {
+               if ( isFunction ||
+                               ( l > 1 && typeof value === "string" &&
+                                       !support.checkClone && rchecked.test( value ) ) ) {
                        return this.each(function( index ) {
                                var self = set.eq( index );
                                if ( isFunction ) {
index fda9db6ce19811b52f339233084b4ed2fa781919..e3fa9d479975323a7d5273217fd2d2102ae328b5 100644 (file)
@@ -33,6 +33,7 @@ define([
        support.noCloneChecked = input.cloneNode( true ).checked;
 
        // #11217 - WebKit loses check when the name is after the checked attribute
+       input.checked = false;
        input.setAttribute( "checked", "t" );
        input.setAttribute( "name", "t" );