Skip to content

[Bug]: dialog directly mounted with open=true could not get focus #26824

@KagamiChan

Description

@KagamiChan

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 33.54 GB / 63.16 GB
  Browsers:
    Edge: Spartan (44.22621.1105.0), Chromium (110.0.1587.41)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

no

Reproduction

https://codesandbox.io/s/focused-sid-ml3ty9

Bug Description

Actual Behavior

the dialog with open=true is mounted and open, but none of the inputs could be focused

Expected Behavior

When the dialog is mounted, elements in the dialog could be focused

Logs

@fluentui/react-dialog: a Dialog should have at least one focusable element inside DialogSurface.
Please add at least a close button either on `DialogTitle` action slot or inside `DialogActions` 
    in Dialog (created by WithForm)
    in WithForm

Requested priority

Normal

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

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions