Fx.Tween does not work correctly with relative element and property 'top', webkit #2337

idleog opened this Issue Mar 21, 2012 · 6 comments


None yet

5 participants


Tween is done immediately. Does work correctly in Firefox, does not in Webkit.

see http://jsfiddle.net/xGQkX/2/

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.


I don't think you should use px. It works with :- myFx.start(0,200).


ok, thanks!

MooTools member

Well, if the first argument is not set, it should use getStyle('top') which returns auto which should become 0px I think..


maybe just normalize this value in prepare? auto is a valid return value from getStyle('top'), for example when the user explicitly sets top: auto it will also fail on Firefox.

MooTools member

Well I think that 'auto' should transform/normalize to a pixel value. Which API to use getStyle vs getComputedStyle? No idea.

Might be worthwhile to introduce a getCSS to return the value in the stylesheet (or getStyleSheet)


or getStyleCSS


The problem is, how do you get the real top? if you set position:absolute; bottom: 0; for example, the auto returned from getStyle('top')can't be translated to 0 (see this example: http://jsfiddle.net/xGQkX/5/, works on Firefox, breaks on Chrome).
Doing this on Element.Style will be actually having logic that naturally belongs to Element.Dimensions (or the Element.Position we don't have). To me the question is: move logic from Dimensions into Style so we never return auto on a getStyle call or add Dimensions as a dependency on Fx.CSS and normalize in there as needed?

@ibolmo ibolmo modified the milestone: 1.5.1, 1.5 Mar 3, 2014
@ibolmo ibolmo added the bug label Mar 3, 2014
@ibolmo ibolmo modified the milestone: 1.6.0, 1.5.1 Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment