diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 09:51:31 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 14:31:06 -0500 |
commit | 7a6c635cfaad8521558374547fc07b71991183e6 (patch) | |
tree | 2ae8d0e7375d471297b9df9848e8c3084648599c | |
parent | c13c5d7d24bb58462f241ef155b030a02a004400 (diff) | |
download | jquery-7a6c635cfaad8521558374547fc07b71991183e6.tar.gz jquery-7a6c635cfaad8521558374547fc07b71991183e6.zip |
Fix support test for checkClone. Fixes Safari 5.1 manip failures.
Conflicts:
src/manipulation.js
-rw-r--r-- | src/manipulation.js | 4 | ||||
-rw-r--r-- | src/manipulation/support.js | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 0094b279a..b19edfa3a 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -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 ) { diff --git a/src/manipulation/support.js b/src/manipulation/support.js index fda9db6ce..e3fa9d479 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -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" ); |