Fix #7641: .animate() should accept "auto" and "" (empty string) values #408

Closed
wants to merge 5 commits into
from

Projects

None yet

3 participants

@louisremi
Contributor

This PR fixes a "patchwelcome" bug in 10 short lines of code.
Unit-tests included.

http://bugs.jquery.com/ticket/7641 (was "patchwelcome", I just reopened it)
http://bugs.jquery.com/ticket/9482

@timmywil
Member

Correct me if I'm wrong, but won't this only work if there are uncomputed styles set that we can fall back to? For instance, the default value of width is "auto" and unless a width is set somewhere in the user css that isn't auto, we still can't do the animation. Doesn't sound like full support of animating "auto".

@louisremi
Contributor

That shouldn't be a problem since we use the computed style of the element

@timmywil
Member

Which will return 'auto' in some cases.

@dmethvin
Member
dmethvin commented Aug 5, 2011

OK, so this pull is no good? Or @louisremi do you think you can solve the problem?

@louisremi
Contributor

Sorry, the discussion continued in the bug report and on IRC:

"The problem of the "auto" value returned for computed style is also present in other part of the effects code, see how jQuery.fx.cur() deals with it. This didn't prevent us from writing the effect component ;-)"

I think Timmywil agreed with that (we can discuss it again if necessary).

@dmethvin
Member
dmethvin commented Sep 2, 2011

If the premise of this PR is still okay, it needs to be updated before it can be merged. Not sure where it stands.

@dmethvin dmethvin closed this Sep 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment