diff options
author | jeresig <jeresig@gmail.com> | 2011-02-23 13:18:44 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2011-02-23 13:18:44 -0500 |
commit | 292acd97a226ec15af2adc069d02973d59c6bc59 (patch) | |
tree | 1226999ac7d6c8a549105ace2930478cacdb9006 /src/support.js | |
parent | 3663836b0180f3a73d96ec234d5d7010e5652a4b (diff) | |
download | jquery-292acd97a226ec15af2adc069d02973d59c6bc59.tar.gz jquery-292acd97a226ec15af2adc069d02973d59c6bc59.zip |
Make a new jQuery.support.noCloneChecked - splitting apart the previous feature detect relating to clone in IE, fixes the last remaining issue with IE 9 RC. Fixes #8365.
Diffstat (limited to 'src/support.js')
-rw-r--r-- | src/support.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/support.js b/src/support.js index 97b4a4263..7470b33e8 100644 --- a/src/support.js +++ b/src/support.js @@ -12,7 +12,8 @@ var all = div.getElementsByTagName("*"), a = div.getElementsByTagName("a")[0], select = document.createElement("select"), - opt = select.appendChild( document.createElement("option") ); + opt = select.appendChild( document.createElement("option") ), + input = div.getElementsByTagName("input")[0]; // Can't get basic test support if ( !all || !all.length || !a ) { @@ -51,7 +52,7 @@ // Make sure that if no value is specified for a checkbox // that it defaults to "on". // (WebKit defaults to "" instead) - checkOn: div.getElementsByTagName("input")[0].value === "on", + checkOn: input.value === "on", // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) @@ -62,12 +63,16 @@ optDisabled: false, checkClone: false, noCloneEvent: true, + noCloneChecked: true, boxModel: null, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableHiddenOffsets: true }; + input.checked = true; + jQuery.support.noCloneChecked = input.cloneNode( true ).checked; + // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as diabled) select.disabled = true; |