Skip to content

[Bug]: autofocus does not work #35944

@MarvinKlein1508

Description

@MarvinKlein1508

Component

TextInput

Package version

3.0.0-rc.10

@microsoft/fast-element version

2.10.2

Environment

System:
    OS: Windows 11 10.0.26200
    CPU: (28) x64 Intel(R) Core(TM) i7-14700K
    Memory: 4.82 GB / 31.78 GB
  Browsers:
    Edge: Chromium (146.0.3856.72)
    Firefox: 148.0.2 - C:\Program Files\Mozilla Firefox\firefox.exe
    Firefox Developer Edition: 150.0 - C:\Program Files\Firefox Developer Edition\firefox.exe
  npmPackages:
    @fluentui/tokens: ^1.0.0-alpha.23 => 1.0.0-alpha.23
    @fluentui/web-components: ^3.0.0-rc.10 => 3.0.0-rc.10
    @microsoft/fast-element: ^2.10.2 => 2.10.2

Current Behavior

when I set autofocus="true" for fluent-text-input then nothing is happening after the page has been loaded.

Expected Behavior

I expect the component to get focused on page load

Reproduction

https://github.com/MarvinKlein1508/wc-v3-autofocus-issue

Steps to reproduce

  1. Clone repository
  2. run npm start
  3. See that the input is not focused

Are you reporting an Accessibility issue?

None

Suggested severity

Low - Has or doesn't need a workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions