Skip to content

[dev-v5] fix: Focus on page navigation#4968

Description

馃悰 Bug Report

There is a weird glitch when using the Autofocus parameter for input components. Whenever a page navigation is happening then autofocus will be ignored.

For some reason this is not the case in the demo project but I couldn't figure out why.

This issue might be related to #4699

馃捇 Repro or Code Sample

https://github.com/MarvinKlein1508/FluentUI-Autofocs-navigation-issue

  1. Run the project
  2. Click on counter
  3. See that the input is not focused
  4. press f5
  5. see the input will be focused

For the demos use: https://github.com/MarvinKlein1508/fluentui-blazor/tree/focus-issue

  1. Navigate to /Debug/Test
  2. Click any of the links/buttons
  3. See element will be focused

馃 Expected Behavior

I expect the input to be focused

馃槸 Current Behavior

The element won't be focused in a blank fluent ui app.

馃拋 Possible Solution

馃敠 Context

馃實 Your Environment

  • OS & Device: Windows 11 64 Bit
  • Browser latest Firefox, Egde & Chrome
  • latest dev-v5 branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-investigationNeeds additional investigationv5For the next major version

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions