Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform treated as attribute instead of style property in Safari (V2) #896

Open
Je1te opened this issue Oct 20, 2018 · 6 comments
Open

Comments

@Je1te
Copy link

Je1te commented Oct 20, 2018

Your system information

  • VelocityJS version: 2.0
  • Browser: Safari
  • Operating System: MacOS

Checklist

  • Is this an issue with code?: No
  • Is this an issue with documentation?: No
  • Have you reproduced this in other browsers?: No
  • Have you checked for updates?: Yes
  • Have you checked for similar open issues?: Yes

Please describe your issue in as much detail as possible:

For V2, in Safari when applying a transform animation to a regular DIV element, this is treated as an HTML attribute instead of CSS style property. Therefore the animation is not working.

In Chrome and Firefox it correctly changes the CSS style property. I did not test IE/Edge.

JSFiddle example showing issue in action (code):

https://jsfiddle.net/z6842sgp/2/

@Rycochet
Copy link
Collaborator

That example doesn't seem to have any code in it, simply a clone of the root example - can you update the link for me to test it :-)

@Je1te
Copy link
Author

Je1te commented Oct 21, 2018

Apologies, updated.

@Rycochet
Copy link
Collaborator

Thanks - not going to be able to look at this immediately, but hopefully I can get some time before the end of the month :-)

@schester44
Copy link

schester44 commented Apr 18, 2019

seeing this issue as well

example of what i'm running

	document.querySelector(".events").velocity(
				{
					transform: [
						() => `translateX(0)`,
						() => `translateX(-640px)`
					]
				},
				{ duration: 1000, easing: "ease-out", delay: 2000 }
			)

@schester44
Copy link

@Rycochet I'd like to poke at this. any recommendations for where I should start looking?

@Rycochet
Copy link
Collaborator

@schester44 There's no special handling for it - it's purely treated like any other string property, so really not sure there. There was a previous problem where a non-unit property was being transformed into a unit property, but that should be fixed - the code that translates it into a valid token list for tweening is here - https://github.com/julianshapiro/velocity/blob/master/src/Velocity/tweens.ts - but it's now been a year since I had enough time to do anything in here and my memory of what's going on is a little lazy (I really hope it's understandable enough) ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants