Skip to main content

Bug Tracker

Side navigation

Ticket #4797: firefox-crash-fix.patch


File firefox-crash-fix.patch, 0.9 KB (added by coreyti, June 20, 2009 09:09PM UTC)

patch for crash fix

Index: jquery/src/fx.js
===================================================================
--- jquery/src/fx.js	(revision 6410)
+++ jquery/src/fx.js	(working copy)
@@ -62,18 +62,18 @@
 		if ( speed ) {
 			return this.animate( genFx("hide", 3), speed, callback);
 		} else {
+			// Set the display of the elements in a separate loop
+			// to avoid the constant reflow
 			for ( var i = 0, l = this.length; i < l; i++ ){
+				this[i].style.display = "none";
+			}
+
+			for ( var i = 0, l = this.length; i < l; i++ ){
 				var old = jQuery.data(this[i], "olddisplay");
 				if ( !old && old !== "none" )
 					jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
 			}
 
-			// Set the display of the elements in a second loop
-			// to avoid the constant reflow
-			for ( var i = 0, l = this.length; i < l; i++ ){
-				this[i].style.display = "none";
-			}
-
 			return this;
 		}
 	},

Download in other formats:

Original Format