#9758 closed bug (invalid)
Invalid argument in IE7 and IE9 compatibility mode.
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have this code in my project:
div.animate( { maxHeight: newMaxHeight + "px" }, 'fast', function() { btn.text(context.m_LocalizedLabels.ShowMoreDetails); context.m_Enlarged = 0; context.callResizeCallbackFunction(); } )
where newMaxHeight is an int, context is an object and btn is an html button.
This code throws this exception:
SCRIPT87: Invalid argument. line 18 character 20327
Change History (14)
comment:1 Changed 12 years ago by
Component: | unfiled → effects |
---|---|
Owner: | set to anonymous |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
As previous stated, this only occur in IE with 7 standards. I've already debugged this segment, and I can definitely that newMaxHeight is numeric.
As for reduced test case, that would be difficult, but I would try.
comment:3 Changed 12 years ago by
I might be able to narrow it down:
a.prop==="height"?Math.max(0,a.now):a.now)+a.unit |
that's what IE is referring to. Checking it further, it seems that a.now is: "noneNAN". Other than that: a.prop is maxHeight and a.unit is "px".
Call stack is:
_default
update step h custom Anonymous Function dequeue Anonymous Function each each queue animate
comment:4 Changed 12 years ago by
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!
comment:5 Changed 11 years ago by
I am having a similar "Invalid argument" issue with XP / IE8 Standards / jQuery 1.6.2 - there seems to be a race condition earlier in the call stack which results in variable fx.now at line 8538 intermittently taking values such as 'NormalNaN', '#444444NaN, etc., depending on which property is being animated.
Unfortunately I am not sufficiently familiar with the internals of jQuery to readily spot where this arises.
comment:6 Changed 11 years ago by
same for me, on IE7 i got an "no valid argument" in line 8538 of jQuery 1.6.2 seem coming from this line :
fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
comment:8 Changed 11 years ago by
i am still getting this bug in IE7 and IE8
i am using .css('min-height', VALUE) with a numeric value without 'px' for resizing the main-div on page-load
comment:9 Changed 11 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Please stop posting the "I am still getting this bug" comments and post a test case we can use to diagnose. I'll reopen the ticket in anticipation of a reply.
comment:10 Changed 11 years ago by
Status: | reopened → pending |
---|
comment:11 Changed 11 years ago by
I see people asking if newMaxHeight on the op snippet is numeric. Even if its not, it doesn't really matter because it gets concatenated with "px", so it becomes a string.
comment:12 Changed 11 years ago by
I can confirm that I get this error only when I'm passing in 0 (zero) with a unit as an argument. For example:
// Fails $("#foo").animate({ marginLeft : "0%" }, "fast"); // Works $("#foo").animate({ marginLeft : "0" }, "fast");
comment:13 Changed 11 years ago by
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!
comment:14 Changed 10 years ago by
Similar fix
Has error: $(this).animate({top: '=0'}, 105);
Works: $(this).animate({top: '0'}, 105);
Hi, can you provide a reduced test case using jsFiddle.net? We don't have enough information to determine if there is a bug.
Most likely the
newMaxHeight
value is non-numeric in the case where IE is throwing the error. Use a debugger (Firebug in Firefox, Ctrl-Shift-I in Chrome, F12 in IE) to stop execution at that point in your code and examine the arguments toanimate()
.