Skip to content

Commit

Permalink
+ A work-around for supporting transitions to and from 'auto' values …
Browse files Browse the repository at this point in the history
…of left, top, width, height, etc.

+ For more details see: https://bugzilla.mozilla.org/show_bug.cgi?id=571344
  • Loading branch information
Aza Raskin committed Jun 10, 2010
1 parent c4eff52 commit 1666826
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions browser/base/content/tabcandy/core/iq.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,19 @@ iQ.fn = iQ.prototype = {
var duration = (options.duration || 400);
var easing = (easings[options.easing] || 'ease');

// The latest versions of Firefox do not animate from a non-explicitly set
// css properties. So for each element to be animated, go through and
// explicitly define 'em.
rupper = /([A-Z])/g;
this.each(function(){
var cStyle = window.getComputedStyle(this, null);
for(var prop in css){
prop = prop.replace( rupper, "-$1" ).toLowerCase();
iQ(this).css(prop, cStyle.getPropertyValue(prop));
}
});


this.css({
'-moz-transition-property': 'all', // TODO: just animate the properties we're changing
'-moz-transition-duration': (duration / 1000) + 's',
Expand Down

0 comments on commit 1666826

Please sign in to comment.