-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Pillar: Complete Blazor WebPriority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-templates
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The user's scrolling position will be maintained when navigating to a new page.
The <h1>
element does not have the focus.
Even though
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
is correctly set- The pages have a
h1
HTML tag
Expected Behavior
After navigating from one page to another, sets focus to an element matching a CSS selector.
Source
Steps To Reproduce
- Create a new project using the new Blazor Web App template.
- Add some content to the sample pages (Home, Counter, Weather) so users need to scroll to get to the bottom of it.
<br />
<div style="height:2000px; background-color:bisque"></div>
<br />
- Once at the bottom bottom of the page, use the menu on the left to navigate to a different page.
- The user will remain at their current scrolling position. The focus is not set on the
<h1>
element.
Exceptions (if any)
No response
.NET Version
8
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Pillar: Complete Blazor WebPriority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-templates