79206834

Date: 2024-11-20 10:48:08
Score: 0.5
Natty:
Report link

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!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Fabian Wesling