jsakamoto / Toolbelt.Blazor.HeadElement

Head element support (change the document title, "meta" elements such as OGP, and "link" elements) for Blazor apps.
https://demo-blazor-headelement.azurewebsites.net/
Mozilla Public License 2.0
158 stars 11 forks source link

Title breaks on URI Fragment "domain.com/test#foo" #15

Closed Bubinga closed 3 years ago

Bubinga commented 3 years ago

Upon page load with the following code, the page is correctly rendered as having the title "Test Title". However, when the user clicks on the link, that title disappears and, in this case, is replaced by the default title of the Blazor App. This code is on a brand new .Net 5 Blazor project with default settings. The issue appears in both Pre-Rendering and in Server Rendering.

@page "/TitleTest"
@using Toolbelt.Blazor.HeadElement

<Title>Test Title</Title>

<a href="/TitleTest#">example</a>
jsakamoto commented 3 years ago

Thank you for reporting!

I fixed this problem and released fixed version of this library.

Please check it out. 😃

Bubinga commented 3 years ago

Thank you for the quick response and fix 👍