diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/manipulation/support.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/manipulation/support.js b/src/manipulation/support.js index 9463a01f1..e2ba066ec 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -3,8 +3,7 @@ define([ ], function( support ) { (function() { - var input, - fragment = document.createDocumentFragment(), + var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ); // #11217 - WebKit loses check when the name is after the checked attribute @@ -14,12 +13,10 @@ define([ // old WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - // Make sure checked status is properly cloned - // Support: IE9, IE10 - input = document.createElement("input"); - input.type = "checkbox"; - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE9-IE11+ + div.innerHTML = "<textarea>x</textarea>"; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; })(); return support; |