aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-11 17:23:17 -0500
committerTimmy Willison <timmywillisn@gmail.com>2013-09-11 17:23:17 -0500
commit1a9f8d9bb17cceb733cc83f106c96e424acd14f9 (patch)
treef07a149a67f68a8af9e9bc950b78e352565e1dae /src
parentd092a88e85a1a66bfc2681e0a4c9648df0dee666 (diff)
downloadjquery-1a9f8d9bb17cceb733cc83f106c96e424acd14f9.tar.gz
jquery-1a9f8d9bb17cceb733cc83f106c96e424acd14f9.zip
Fix more support tests (support.input should only be false in IE8 and checkClone as it is now used is fine in IE)
Diffstat (limited to 'src')
-rw-r--r--src/attributes/support.js3
-rw-r--r--src/support.js15
2 files changed, 6 insertions, 12 deletions
diff --git a/src/attributes/support.js b/src/attributes/support.js
index 5d4be1aa4..aeeb3af2f 100644
--- a/src/attributes/support.js
+++ b/src/attributes/support.js
@@ -44,8 +44,9 @@ define([
select.disabled = true;
support.optDisabled = !opt.disabled;
+ // Support: IE8 only
// Check if we can trust getAttribute("value")
- input = document.createElement("input");
+ input = document.createElement( "input" );
input.setAttribute( "value", "" );
support.input = input.getAttribute( "value" ) === "";
diff --git a/src/support.js b/src/support.js
index 00fd82928..3add264bf 100644
--- a/src/support.js
+++ b/src/support.js
@@ -23,11 +23,7 @@ jQuery(function() {
// We need to execute this one support test ASAP because we need to know
// if body.style.zoom needs to be set.
- var container,
- div = document.createElement( "div" ),
- divReset =
- "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;" +
- "display:block;padding:0;margin:0;border:0",
+ var container, div,
body = document.getElementsByTagName("body")[0];
if ( !body ) {
@@ -36,12 +32,10 @@ jQuery(function() {
}
// Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
container = document.createElement( "div" );
container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+ div = document.createElement( "div" );
body.appendChild( container ).appendChild( div );
if ( typeof div.style.zoom !== strundefined ) {
@@ -49,10 +43,9 @@ jQuery(function() {
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ div.style.cssText = "width:1px;padding:1px;display:inline;zoom:1";
- if ( (support.inlineBlockNeedsLayout = div.offsetWidth === 3) ) {
+ if ( (support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 )) ) {
// Prevent IE 6 from affecting layout for positioned elements #11048
// Prevent IE from shrinking the body in IE 7 mode #12869
// Support: IE<8