-
Notifications
You must be signed in to change notification settings - Fork 32
zf-reveal should destroy the overlay when component is destroyed. #26
Comments
Looking around some more, looks like zf-widget.js has a I was testing this on a fork for |
Found the problem. There's a typo for the event. Now some tests are failing. I'll see if I can get those fixed. |
sorry. so how do you properly destroy a reveal modal after it's closed? |
@rizkysyazuli according to https://github.com/acoustep/ember-cli-foundation-6-sass/blob/master/addon/mixins/zf-widget.js#L82 the reveal modal will be destroyed when the component using the modal is destroyed. |
@GCheung55 it does that automatically? doesn't seem so in my case. i have youtube video inside a modal that's keep playing even after it's closed. |
@rizkysyazuli Yes, it does automatically. As I mentioned, the reveal modal will be destroyed when the component using the modal is destroyed. Closing the modal, such as pressing the ESC key, will only hide the modal, not destroy it. {{! templates/index.hbs}}
{{#zf-reveal id="awesome-modal"}}
MODAL!
{{/zf-reveal}}
<button data-open="awesome-modal">Show me the modal!</button> If you do a search for a DOM element with id Now, when you navigate away to a different page, the What's missing in Take a look at #72 (comment) for an example. |
When a zf-reveal component is inserted into the page, an overlay is created and injected into the element. But when the zf-reveal component is unloaded the overlay isn't destroyed.
The text was updated successfully, but these errors were encountered: