Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5401 closed bug (duplicate)

effects.core.js crash with IE8 in the color animation

Reported by: daok911 Owned by:
Priority: minor Milestone:
Component: ui.effects.core Version: 1.7.2
Keywords: color Cc:
Blocked by: Blocking:

Description

This function at line 221 to 224 :

/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 */

// We override the animation for all of these color styles
$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
		$.fx.step[attr] = function(fx) {
				if ( fx.state == 0 ) {
						fx.start = getColor( fx.elem, attr );
						fx.end = getRGB( fx.end );
				}

				fx.elem.style[attr] = "rgb(" + [
						Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
						Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
						Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
				].join(",") + ")";
			};
});

Crash when fx.elem.style[attr] is set to a color. It doesn't happen every time but still happen more than 40% of times. The color is built with fx.end.. and fx.start.. and it occurs that sometime the start and end are NULL.

http://clip2net.com/clip/m12122/1269274742-clip-31kb.png

Change History (2)

comment:1 Changed 9 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #4251.

comment:2 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.