headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

<Dialog> won't open when unmount is set to false

Open spacecat opened this issue 1 year ago • 0 comments

What package within Headless UI are you using? "@headlessui/react": "0.0.0-insiders.fbad6a9",

What browser are you using? Chrome Version 126.0.6478.127 (Official Build) (arm64)

Reproduction URL

https://github.com/spacecat/headless-ui-dialog-unmount

Describe your issue

  1. Follow the docs here: https://headlessui.com/react/dialog
  2. Add a basic dialog with a backdrop and transitions
  3. Add unmount={false} to the <Dialog> component
  4. The dialog will not open when you add unmount={false} to the <Dialog> component

If you comment out transition on both the <DialogBackdrop> and <DialogPanel> while keeping unmount={false} on <Dialog>, the dialog will start working again when you click the button.

spacecat avatar Jun 29 '24 09:06 spacecat