animate{ height:'auto' } issue with firefox 19.0 #712

Closed
zxdong262 opened this Issue Mar 8, 2013 · 5 comments

Comments

Projects
None yet
5 participants

the callback will not fire in firefox 19,but works fine in chrome 24.0.1312.57 m

$('a').click(function() {
    $('#x').animate({
        height:'auto'
    },1000,'ease out',function() {
        $('#y').text('callback fires');
        $('#x').height(200);
    })
})

check the demo here
http://jsfiddle.net/62uF7/1/

It doesn't really make sense to animate height to auto. It just so happens that the way the transition is applied in Chrome animates it to 0, which is probably not the intended affect anyway, right?

Contributor

AliMD commented Mar 8, 2013

zepto just set height:'auto' and transition in css
this is a browser level bug and not related to zepto

you can calc height and replace auto by that
http://jsbin.com/utewus/2/edit

Contributor

AliMD commented Mar 8, 2013

height:auto work like height:0px for me !
I don't understand why this happened in chrome too with pure css3 !!!
http://jsbin.com/utewus/3/edit

tested in chrome 26 canary and 25 stable osx

Contributor

miketaylr commented Oct 23, 2013

This isn't a Zepto bug really, but a browser-level bug. You can track the bug for Firefox to fix this over at https://bugzilla.mozilla.org/show_bug.cgi?id=571344 but it seems like it's more of an undefined spec issue.

Owner

madrobby commented Nov 24, 2013

Closing as it's a browser bug.

@madrobby madrobby closed this Nov 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment