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

Attributes are not removed when other tag without attributes is mounted on an element #2098

Closed
YoussefKababe opened this Issue Nov 26, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@YoussefKababe
Contributor

YoussefKababe commented Nov 26, 2016

Describe your issue:

When I have a tag with some attributes mounted on an element in the page, the element takes the attributes of that tag. But when I mount another tag without attributes on the same element, the element keeps the attributes from the previous tag although it's no longer mounted on it.

Can you reproduce the issue?

Yes: http://plnkr.co/edit/kVglDAoBBbHI0W5XG9E8?p=preview

On which browser/OS does the issue appear?

Tried it on Safari and Chrome, both have same issue.

Which version of Riot does it affect?

riot@3.0.0
riot@3.0.1

How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@YoussefKababe

This comment has been minimized.

Show comment
Hide comment
@YoussefKababe

YoussefKababe Nov 27, 2016

Contributor

This issue is actually for all the attributes coming from the mounted tag and not only the class attribute... I'll edit title and description

Contributor

YoussefKababe commented Nov 27, 2016

This issue is actually for all the attributes coming from the mounted tag and not only the class attribute... I'll edit title and description

@YoussefKababe YoussefKababe changed the title from Class is not removed when other tag without class is mounted on an element to Attributes are not removed when other tag without attributes is mounted on an element Nov 27, 2016

YoussefKababe added a commit to YoussefKababe/riot that referenced this issue Nov 27, 2016

YoussefKababe added a commit to YoussefKababe/riot that referenced this issue Nov 27, 2016

@rubn-g

This comment has been minimized.

Show comment
Hide comment
@rubn-g

rubn-g Nov 27, 2016

I've the same problem with riot 3.0.1

rubn-g commented Nov 27, 2016

I've the same problem with riot 3.0.1

YoussefKababe added a commit to YoussefKababe/riot that referenced this issue Nov 27, 2016

YoussefKababe added a commit to YoussefKababe/riot that referenced this issue Nov 27, 2016

GianlucaGuarini added a commit that referenced this issue Nov 29, 2016

Merge pull request #2106 from YoussefKababe/remove-attributes-on-unmount
Remove all attributes of a tag when unmounting it. Fixes #2098

GianlucaGuarini added a commit that referenced this issue Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment