elm / virtual-dom

The foundation of HTML and SVG in Elm.
https://package.elm-lang.org/packages/elm/virtual-dom/latest
BSD 3-Clause "New" or "Revised" License
209 stars 80 forks source link

Reusing anchor node leaves empty href attr #169

Open sgaston321 opened 4 years ago

sgaston321 commented 4 years ago

Problem: When an anchor node that has an href is reused by the virtualdom, it leaves an empty href="" attribute instead of removing the attribute. This causes clicks to reload the page.

Example: https://ellie-app.com/8NNcGgTmMfpa1

sgaston321 commented 4 years ago

workaround is to use another type of node when you don't want a link and style appropriately