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

`<div if="...">` containing `<div data-is="...">` does not unmount tag properly #2307

Closed
bminer opened this issue Apr 5, 2017 · 1 comment
Closed
Labels

Comments

@bminer
Copy link
Contributor

@bminer bminer commented Apr 5, 2017

This is a bug, I think.

Consider:

<div if="{active}">
  <div data-is="{tagName}"></div>
</div>

When active is set, the tagName will be mounted, but when active flag is cleared, the tagName is removed from the DOM but not automatically unmounted (i.e. no "unmount" events are fired and the tag instance is not cleaned up).

This also makes me wonder what would happen if <div data-is></div> tags are removed from the DOM manually... would this same bug occur?

Here it is on Plnkr in fewer than 70 lines of code.

I am using Chromium 56 on Linux Mint 18.1. Riot 3.4.0.

GianlucaGuarini added a commit that referenced this issue Apr 9, 2017
GianlucaGuarini added a commit that referenced this issue Apr 9, 2017
* bug/2307:
  closes #2307
  added: test for #2307
@bminer
Copy link
Contributor Author

@bminer bminer commented Apr 10, 2017

@GianlucaGuarini - Thank you! BTW... Riot is awesome. So much better than any other reactive UI framework that I've used (and I've tried a lot of them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.