After thorough investigation, I realized that the issue wasn’t directly related to navigation but rather to a style that impacts scroll behavior in the MudBlazor library. Specifically, the following CSS is predefined in MudBlazor:
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
This smooth scroll behavior can cause a visible "jump" effect for users. The solution was to override this style as follows:
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: auto !important;
}
}
With this adjustment, the issue was completely resolved. I also noticed that the default Blazor templates exhibit similar behavior, so it might be worth reviewing and tweaking this style if you encounter the same problem.
I hope this solution helps others dealing with a similar issue. Thanks to everyone for your suggestions and insights!