diff --git a/src/manipulation/support.js b/src/manipulation/support.js index 427660361..b1f4941bf 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -7,8 +7,6 @@ define([ div = document.createElement("div"), input = document.createElement("input"); - input.type = "checkbox"; - // Setup div.setAttribute( "className", "t" ); div.innerHTML = "
a"; @@ -29,15 +27,18 @@ define([ support.html5Clone = document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; fragment.appendChild( input ); support.appendChecked = input.checked; + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + // #11217 - WebKit loses check when the name is after the checked attribute fragment.appendChild( div ); div.innerHTML = ""; diff --git a/test/unit/support.js b/test/unit/support.js index 6bb69e350..1b95fef21 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -178,7 +178,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec "inlineBlockNeedsLayout": false, "input": true, "leadingWhitespace": true, - "noCloneChecked": true, + "noCloneChecked": false, "noCloneEvent": true, "opacity": true, "optDisabled": true,