-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Reveal] Reveal problem when using deepLink and more nested modal windows #8012
Comments
Thanks for reporting this. I guess we have to refctor this a bit to get this case working like it should work. |
What do you think @ncoden ? Revisit this for v7? |
@DanielRuf I don't even understand what the issue is :/ |
The issue is that nested reveals do not open when you go back in the history like they were opened but in reverse. It stops after the first last reveal. |
Try seeing all previously opened reveals by hitting the history.back button. |
Ok thanks, it's after modals got closed. I'll take a look at it tomorrow. |
Ahah. On it. |
…n#8012 When closing a Reveal with `replaceState: true`, push a new entry to reset the hash. So going back to the history reopen the modals opened before in reverse order. Closes foundation#8012
See #11093 |
…link-history-8012 for v6.5.0 42d267a fix: update history when closing Reveal with `replaceState` foundation#8012 88c08bd fix: prevent Reveal opening with its hash already set to add history entry d5fe114 tests: add visual tests for nested Reveal with deep-linking Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
How can we reproduce this bug?
What did you expect to happen?
When you go from the first modal window to another, I'd like to see URL with appropriate hash, like
#modal-1
. But because we have 2 nested modals, new modal will change current URL by https://github.com/zurb/foundation-sites/blob/develop/js/foundation.reveal.js#L277 but previous modal will be closed right after opening. So URL will be changed again by https://github.com/zurb/foundation-sites/blob/develop/js/foundation.reveal.js#L471Possible solution
My temporary solution is replace this part of code https://github.com/zurb/foundation-sites/blob/develop/js/foundation.reveal.js#L469-L475 with something like this:
I know that it isn't ideal but it's working for now.
The text was updated successfully, but these errors were encountered: