Skip to content

<a> tag is wrongly assumed to be in html namespace instead of svg #6506

Closed
@roblabla

Description

@roblabla

Version

2.4.2

Reproduction link

https://jsfiddle.net/4s3hj82k/

Steps to reproduce

  1. Create a template using as the root element

  2. Try to use it in an

What is expected?

I either expected vue to understand that the is supposed to be an SVG a tag (and not an xhtml a tag), or a way for me to override vue's decision and give it the proper namespace (e.g. making svg:a work ?)

What is actually happening?

Vue is creating the tag as an xhtml:a tag, and so the browser doesn't render it.

You can make it render by wrapping it in an . This is undesirable however, for many reasons. Having a way to explicitly tell vue the namespace from which to create the element would be nice.


SVG <a> tag : https://developer.mozilla.org/fr/docs/Web/SVG/Element/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions