Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FocusOnNavigate does not scroll to selector

Tags:

blazor

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

like image 218
Tyler Durden Avatar asked Jun 23 '26 05:06

Tyler Durden


1 Answers

The issue has been confirmed: github.com/dotnet/aspnetcore/issues/52412

like image 50
Tyler Durden Avatar answered Jun 25 '26 21:06

Tyler Durden