aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-22 15:46:54 -0500
committerjeresig <jeresig@gmail.com>2009-12-22 15:46:54 -0500
commita00e63ea5a2c26f8e6384b5d1e2247be44c727e9 (patch)
treeae753969bb7fbda549068216062205f07c11e1d9 /src/support.js
parent7b0b348419c85841671459b4d7153afc88d1fa83 (diff)
downloadjquery-a00e63ea5a2c26f8e6384b5d1e2247be44c727e9.tar.gz
jquery-a00e63ea5a2c26f8e6384b5d1e2247be44c727e9.zip
Make a feature detect for the attribute selected code. Fixes #5702.
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/support.js b/src/support.js
index 976729828..3e9977278 100644
--- a/src/support.js
+++ b/src/support.js
@@ -8,7 +8,7 @@
id = "script" + now();
div.style.display = "none";
- div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><select><option>text</option></select><input type='checkbox'/>";
+ div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var all = div.getElementsByTagName("*"),
a = div.getElementsByTagName("a")[0];
@@ -52,6 +52,10 @@
// (WebKit defaults to "" instead)
checkOn: div.getElementsByTagName("input")[0].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)
+ optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+
// Will be defined later
scriptEval: false,
noCloneEvent: true,