Prevent Blazor from focusing h1 tags

Blazor focuses h1 tags on every page out of the box.

Depending on the CSS framework your using, this can have undesired consequences. Like adding ugly outlines around your <h1> tags.

Blazor h1 border

The culprit is 1 line in your App.razor file.

<FocusOnNavigate RouteData="@routeData" Selector="h1" />

Removing it from the file will stop Blazor from focusing your <h1> tags.