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 usehref="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?