From: Timmy Willison Date: Wed, 11 Sep 2013 20:03:40 +0000 (-0500) Subject: Set the input type for firefox. Fix a support test. X-Git-Tag: 1.11.0-beta1~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d092a88e85a1a66bfc2681e0a4c9648df0dee666;p=jquery.git Set the input type for firefox. Fix a support test. --- diff --git a/src/manipulation/support.js b/src/manipulation/support.js index 01d2a0ad1..2a2dcab23 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -7,6 +7,8 @@ define([ div = document.createElement("div"), input = document.createElement("input"); + input.type = "checkbox"; + // Setup div.setAttribute( "className", "t" ); div.innerHTML = "
a"; diff --git a/src/support.js b/src/support.js index e039a7a4f..00fd82928 100644 --- a/src/support.js +++ b/src/support.js @@ -16,6 +16,8 @@ for ( i in jQuery( support ) ) { support.ownLast = i !== "0"; // Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; jQuery(function() { // We need to execute this one support test ASAP because we need to know @@ -42,9 +44,6 @@ jQuery(function() { body.appendChild( container ).appendChild( div ); - // Will be changed later if needed. - support.inlineBlockNeedsLayout = false; - if ( typeof div.style.zoom !== strundefined ) { // Support: IE<8 // Check if natively block-level elements act like inline-block @@ -52,9 +51,8 @@ jQuery(function() { // them layout div.innerHTML = ""; div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - if ( support.inlineBlockNeedsLayout ) { + 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 diff --git a/test/unit/support.js b/test/unit/support.js index 617310b63..6b5b0baa5 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -1,7 +1,5 @@ module("support", { teardown: moduleTeardown }); -var computedSupport = getComputedSupport( jQuery.support ); - function getComputedSupport( support ) { var prop, result = {}; @@ -17,6 +15,8 @@ function getComputedSupport( support ) { return result; } +var computedSupport = getComputedSupport( jQuery.support ); + test( "zoom of doom (#13089)", function() { expect( 1 );