headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Dialog StopPropagation not stopping propagation.

Open zwiesenthal opened this issue 2 months ago • 0 comments

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.

zwiesenthal avatar Sep 29 '25 21:09 zwiesenthal