Skip to content

Blazor web app (dotnet 8): data-enhance-nav="false" is not working when tag <a/> is wrapping some <svg/> #52205

Closed
@megafetis

Description

@megafetis

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

<a href="/" data-enhance-nav="false"> <svg>...Not refresh page...</svg> </a> - is not working (not refreshing a page. enhance-nav is still enabled)

<a href="/" data-enhance-nav="false"> <img src=""/> </a> - is working (refreshing a page)
This problem is also actual for top level nodes for example ... link with svg ...

Expected Behavior

No response

Steps To Reproduce

jsut create new Blazor Web app and add some code

<a href="/" data-enhance-nav="false">
    <svg xmlns="http://www.w3.org/2000/svg"
     width="467" height="462">
  <rect x="80" y="60" width="250" height="250" rx="20"
      style="fill:#ff0000; stroke:#000000;stroke-width:2px;" />
  
  <rect x="140" y="120" width="250" height="250" rx="40"
      style="fill:#0000ff; stroke:#000000; stroke-width:2px;
      fill-opacity:0.7;" />

  <rect x="140" y="120" width="250" height="250" rx="40"
      style="fill:#00ff00; stroke:#0000cc; stroke-width:5px;
      fill-opacity:1.0;" />
</svg>
</a>

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions