Side navigation
#9745 closed bug (invalid)
Opened July 05, 2011 01:44PM UTC
Closed July 21, 2011 07:54AM UTC
Last modified September 27, 2011 07:22PM UTC
IE8 fx.step._default method causes "Invalid argument" error
Reported by: | jona@slightlyremarkable.com | Owned by: | jona@slightlyremarkable.com |
---|---|---|---|
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; } }
Attachments (0)
Change History (3)
Changed July 06, 2011 01:40PM UTC by comment:1
component: | unfiled → effects |
---|---|
owner: | → jona@slightlyremarkable.com |
priority: | undecided → low |
status: | new → pending |
Changed July 21, 2011 07:54AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | pending → closed |
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!
Changed September 27, 2011 07:22PM UTC by comment:3
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' ) {
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.