Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9745 closed bug (invalid)

IE8 fx.step._default method causes "Invalid argument" error

Reported by: jona@… Owned by: jona@…
Priority: low Milestone: 1.next
Component: effects Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Line 8498 triggers an error under certain conditions in IE8 only (works in IE7).

There is a call to fx.now, which is never executed and returns a function object (not a value). When this value returns, it gets concatenated with fx.unit and is assigned to the specified property of fx.elem.style. IE8 doesn't recognize this property and throws an error.

In my case, I have a combination of jQuery, Fancybox, jCarousel, and several degrees of Ajax communication occurring. Fancybox is being applied to DIV elements. When Fancybox is triggered (via onClick), it opens in IE8 but fails when attempting to load the content.

How I fixed this issue:

I modified the _default method to be the following. This seems to work in all browsers, including IE8:

		_default: function( fx ) {
			var now = fx.now();
			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
				fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, now) : now) + fx.unit;
			} else {
				fx.elem[ fx.prop ] = now;
			}
		}

Change History (3)

comment:1 Changed 8 years ago by timmywil

Component: unfiledeffects
Owner: set to jona@…
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:3 Changed 8 years ago by tracey@…

we had same IE problem here at www.archive.org, using mwEmbed A/V player. mwEmbed fixed it with this line change for us:

< if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {

if ( fx.elem.style && fx.elem.style[ fx.prop ] != null && fx.elem.style[ fx.prop ] != 'relative' && fx.prop != 'position' ) {

Note: See TracTickets for help on using tickets.