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

The "open.zf.reveal" event is fired before the reveal modal has opened. #11625

Closed
ozzywadd opened this issue Dec 13, 2018 · 5 comments
Closed

Comments

@ozzywadd
Copy link

What should happen?

The "open.zf.reveal" event should only be fired once the reveal modal has opened.

What happens instead?

The "open.zf.reveal" event is fired before the reveal modal has opened.

Test Case and/or Steps to Reproduce (for bugs)

https://codepen.io/anon/pen/dwYmOB?editors=1010

Context

I need to target the reveal modal contents to initiate more js once it's open. The "open.zf.reveal" event seems like the logical extension point here but for some reason, the reveal modal is not present at the time this event is triggered.

@DanielRuf
Copy link
Contributor

We might have to introduce the closed here too. See #10949 (comment)

@ozzywadd
Copy link
Author

I figured that the reason for this was the delay on the animation. I believe even the default duration of show() is 400ms although, adding any amount of duration in a setTimeout function seemed to prove successful for me. Far from ideal though.

@DanielRuf
Copy link
Contributor

Why not chain the close event check with a check for animationend? We also have utils for this. You can nest the .on() checks like we do in some of our tests.

@DanielRuf
Copy link
Contributor

Closing this issue as we did not receive any further feedback. Let us know if we should reopen this.

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