Skip to content

Dialog StopPropagation not stopping propagation. #3803

@zwiesenthal

Description

@zwiesenthal

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

"@headlessui/react": "^2.1.2",

What browser are you using?

Chrome

Reproduction URL

https://github.com/zwiesenthal/headless-ui-dialog-issue

Describe your issue

  • Dialog closes when Escape is pressed
  • The Escape key event is consumed by the Dialog and does not propagate to other listeners
  • I see that the Dialog.tsx uses useEscape and calls event.preventDefault() and event.stopPropagation, so I'm surprised this issue is happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions