Skip to main content

Bug Tracker

Side navigation

Ticket #4014: support.js.diff
File support.js.diff, 0.6 KB (added by ricardobeat, January 28, 2009 06:44PM UTC)

Patch proposal

Index: jquery/src/support.js
===================================================================
--- jquery/src/support.js	(revision 6169)
+++ jquery/src/support.js	(working copy)
@@ -88,12 +88,11 @@
 	// document.body must exist before we can do this
 	jQuery(function(){
 		var div = document.createElement("div");
-		div.style.width = "1px";
-		div.style.paddingLeft = "1px";
+		div.style.width = div.style.paddingLeft = "1px";
 
 		document.body.appendChild( div );
 		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
-		document.body.removeChild( div );
+		document.body.removeChild( div ).style.display = 'none';
 	});
 })();

Download in other formats:

Original Format