Commit 8a832797 authored by Timmy Willison's avatar Timmy Willison

Fix support test for checkClone. Fixes Safari 5.1 manip failures.

parent 19de30ce
...@@ -488,8 +488,9 @@ jQuery.fn.extend({ ...@@ -488,8 +488,9 @@ jQuery.fn.extend({
isFunction = jQuery.isFunction( value ); isFunction = jQuery.isFunction( value );
// We can't cloneNode fragments that contain checked, in WebKit // We can't cloneNode fragments that contain checked, in WebKit
if ( isFunction || !( l <= 1 || typeof value !== "string" || support.checkClone || if ( isFunction ||
!rchecked.test( value ) ) ) { ( l > 1 && typeof value === "string" &&
!support.checkClone && rchecked.test( value ) ) ) {
return this.each(function( index ) { return this.each(function( index ) {
var self = set.eq( index ); var self = set.eq( index );
if ( isFunction ) { if ( isFunction ) {
......
...@@ -14,6 +14,7 @@ define([ ...@@ -14,6 +14,7 @@ define([
support.noCloneChecked = input.cloneNode( true ).checked; support.noCloneChecked = input.cloneNode( true ).checked;
// #11217 - WebKit loses check when the name is after the checked attribute // #11217 - WebKit loses check when the name is after the checked attribute
input.checked = false;
input.setAttribute( "checked", "t" ); input.setAttribute( "checked", "t" );
input.setAttribute( "name", "t" ); input.setAttribute( "name", "t" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment