Skip to content

[Bug]: Alert Dialog is dismissible by Esc Key #35526

@kkakroo

Description

@kkakroo

Component

Dialog

Package version

9.72.7

React version

18

Environment

System:
    OS: macOS 26.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 67.47 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Brave Browser: 142.1.84.141
    Chrome: 142.0.7444.176
    Chrome Canary: 144.0.7550.0
    Firefox: 145.0.1
    Safari: 26.1

Current Behavior

Currently in the Dialog Alert story this behaviour is present.
The Dialog content mentions This dialog cannot be dismissed by clicking on the backdrop nor by pressing Escape. Close button should be pressed to dismiss this Alert but it can be closed by Esc key.

Expected Behavior

The Alert dialog should not be closed by Esc key press.

Reproduction

https://storybooks.fluentui.dev/react/?path=/docs/components-dialog--docs#alert

Steps to reproduce

  1. Go to Fluent UI Dialog story provided in the link.
  2. Go to the Alert story.
  3. Open theDialog and press on Esc key.

Are you reporting an Accessibility issue?

None

Suggested severity

High - No workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions