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

Animation doesn't play after link is clicked. #69

Closed
dylancristy opened this issue Jul 31, 2015 · 4 comments
Closed

Animation doesn't play after link is clicked. #69

dylancristy opened this issue Jul 31, 2015 · 4 comments

Comments

@dylancristy
Copy link

I am using the "ripple out" effect for some links. The links are set to open in a new window/tab. What is happening is that after someone clicks the link, a new tab is opened, but if you go back to the original page, the animation no longer plays for the link you just clicked on, until you refresh the page.

How can I fix that, so that the animation always plays?

@artemverbo
Copy link

+1

@chbdetta
Copy link

chbdetta commented Aug 4, 2015

I create a fiddle: http://jsfiddle.net/2domtkmj/1/

It seems :focus is to blame.
We can't restart an animation without firstly reset it's animation state, which is the case when it's focused. Blurring can reset the state.

Clicking an anchor will implicitly focus on it. :hover won't work until anchor is blurred out.
Blurring happens when you click somewhere else, press [tab] or refresh the page.

Simply comment out :focus selector, or replace <a> with something un-focusable will work but we will lose focus-triggering animation as a result.

In addition, switching animation to transition will break the ripple-out effect.

@dylancristy
Copy link
Author

Excellent, thanks. I will take out the :focus.

@IanLunn
Copy link
Owner

IanLunn commented Aug 4, 2015

Thanks for answering this one @chbdetta

@IanLunn IanLunn closed this as completed Aug 4, 2015
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

4 participants