#StackBounty: #c# #html #asp.net-core #blazor Scroll click not working with NavigationManager.NavigateTo, and I can't use href beca…

Bounty: 100

I have a Blazor Server web app; .NET 5.

I am running into frustrations related to navigating between pages in my web app:

  • When I use NavigationManager.NavigateTo(uri, true), I am unable to open links using my scroll click (which would open the link in a new browser tab if I were to use href="uri" instead). It opens a new tab, but loads the same page I was already on.
  • When I use href="uri" instead, the scroll-click works. However, it introduces a new problem: with a ‘normal’ left-click, the new page loads but retains the scroll position of the previous page in a mobile browser (I have tested with mobile Safari, as well as the mobile emulator in Chrome).

I need to be able to scroll-click into a new tab, as well as have a new page load without retaining the previous page’s scroll position. Any tips?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.