I'm experimenting with the new Blazor WebApp template (dotnet 8) and found that the 'FocusOnNavigate' feature does not work.
You can test this behaviour by simply adding some length to the sample pages (Home, Counter, Weather)
<br />
<div style="height:1500px; background-color:bisque"></div>
<br />
On any of these three pages, scroll down to the bottom and then, use the menu on the left to navigate to a different page. The user will remain at their current scrolling position when navigating to a new page. Even though they have the correct Selector h1
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
Is it an issue or does something else need to be configured?
Commit: https://github.com/dotnet/aspnetcore/commit/e6d3b3b8b88f03da7d5eaa94dcd2e5c2605d9a57
The issue has been confirmed: github.com/dotnet/aspnetcore/issues/52412
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With