Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
idleog opened this Issue · 6 comments

5 participants

idleog zorot Arian Stolwijk Gonzalo Rubio Olmo Maldonado
idleog

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.

zorot

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

idleog

ok, thanks!

Arian Stolwijk
Owner

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

Gonzalo Rubio
Collaborator

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.

Olmo Maldonado
Owner

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

Gonzalo Rubio
Collaborator

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?

Olmo Maldonado ibolmo modified the milestone: 1.5.1, 1.5
Olmo Maldonado ibolmo added the bug label
Olmo Maldonado ibolmo modified the milestone: 1.6.0, 1.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.