diff options
Diffstat (limited to 'src/support.js')
-rw-r--r-- | src/support.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/support.js b/src/support.js index 75e89dd0e..201591893 100644 --- a/src/support.js +++ b/src/support.js @@ -20,6 +20,9 @@ return; } + var select = document.createElement("select"); + var opt = select.appendChild( document.createElement("option") ); + jQuery.support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: div.firstChild.nodeType === 3, @@ -56,15 +59,21 @@ // 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) - optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected, + optSelected: opt.selected, // Will be defined later + optDisabled: false, checkClone: false, scriptEval: false, noCloneEvent: true, boxModel: null }; + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as diabled) + select.disabled = true; + jQuery.support.optDisabled = !opt.disabled; + script.type = "text/javascript"; try { script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); |