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

Comments

Projects
None yet
2 participants
@bminer
Contributor

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

Merge branch 'bug/2307' into dev
* bug/2307:
  closes #2307
  added: test for #2307
@bminer

This comment has been minimized.

Show comment
Hide comment
@bminer

bminer Apr 10, 2017

Contributor

@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).

Contributor

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