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

Flash of pre-animated content #185

Closed
ef4 opened this issue Jul 16, 2014 · 1 comment
Closed

Flash of pre-animated content #185

ef4 opened this issue Jul 16, 2014 · 1 comment

Comments

@ef4
Copy link

ef4 commented Jul 16, 2014

This is the flash of pre-animated content issue that I mentioned in #184. It happens on iOS:

http://jsbin.com/denabaju/1/edit

The animation is translateX: ["0%", "100%"] on a newly-inserted element, such that the force-feeding should cause the element to start off to the side. But I see it flicker in the untranslated position first. It doesn't happen every single time, but at least one out of three on my test ipad.

If I insert the element with display: none and pass a display option to velocity, the flicker goes away. But if instead I clear the inline display style myself in a begin callback (or before invoking velocity), the flicker remains.

@julianshapiro
Copy link
Owner

Yeah, I see why that flicker wouldn't go away in the case of trying to do it yourself in a begin (as I had suggested): the display property isn't being set close enough to the rAF tick's DOM update.

As you know, your particular issue has nothing to do with Velocity itself, but rather it's an overall timing issue. So, why don't you start with your element pre-positioned (via CSS) at translateX: 100%?

We'll continue this convo in the existing thread.

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

2 participants