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

opened.fndtn.reveal calllback invoked twice #6482

Closed
ktei opened this issue Apr 20, 2015 · 3 comments
Closed

opened.fndtn.reveal calllback invoked twice #6482

ktei opened this issue Apr 20, 2015 · 3 comments

Comments

@ktei
Copy link

ktei commented Apr 20, 2015

Dear Foundation Team:
I'm not sure this is expected or not, but after doing this:

$(document).on('opened.fndtn.reveal', '#' + this._id, this._onOpen)

where this._id points to a modal container, and this._onOpen is the callback function. However, I noticed that this._onOpen is invoked twice everytime the Modal is opened.

Also, if I changeel.trigger('opened').trigger('opened.fndtn.reveal') to el.trigger('opened.fndtn.reveal') (in file foundation.reveal.js), this can resolve the issue but surely it's not the solution.

Can you give me any hints? Did I do something improper?

Cheers

@ktei
Copy link
Author

ktei commented Apr 20, 2015

By the way, I'm using 5.5.1

@rafibomb
Copy link
Member

Looks like a similar one to this - #5482
Closing this in favor of that issue.

Also we addressed this issue here:

@ktei
Copy link
Author

ktei commented Apr 24, 2015

@rafibomb Thank you for your response. I also found another issue caused by this so I think it'd better to let your team know:

See foundation.dropdown.js, where you find self.S(this).trigger('closed').trigger('closed.fndtn.dropdown', [dropdown]);

This will trigger the closed event for sure however, it seems closed event will trigger a Reveal modal to be closed. Therefore, if you use dropdown button in a Reveal modal, whenever you close the collapse dropdown button, the Reveal modal gets closed too.

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