diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 09:51:31 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 09:51:31 -0500 |
commit | 8a832797c0b47a0da9bfe036742df2271c041394 (patch) | |
tree | 3a7428373e11910ec4c8bc69658290113185d820 /src | |
parent | 19de30ce0f781a4c126d0220f7a7651db4568e2d (diff) | |
download | jquery-8a832797c0b47a0da9bfe036742df2271c041394.tar.gz jquery-8a832797c0b47a0da9bfe036742df2271c041394.zip |
Fix support test for checkClone. Fixes Safari 5.1 manip failures.
Diffstat (limited to 'src')
-rw-r--r-- | src/manipulation.js | 5 | ||||
-rw-r--r-- | src/manipulation/support.js | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index d8b45528c..c51175570 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -488,8 +488,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 7435de7d9..434dd48fe 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -14,6 +14,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" ); |