headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Cannot focus out of popover within modal

Open nicolas-besnard opened this issue 1 year ago • 0 comments

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

1.7.17

Reproduction URL

https://codesandbox.io/p/sandbox/headless-ui-x-daterangepicker-c7zgr8

https://github.com/tailwindlabs/headlessui/assets/1261670/a646c131-12a2-45e6-a338-3cdc489ba413

Describe your issue

When using MUI daterange picker on a button within a HeadlessUI modal, once opened, I cannot close the daterange picker.

Weirdly, it's working if the daterange is bound to and input.

If I replace the Dialog.Panel with a div in my Modal, the component is working again. By looking at the code of Dialog.Panel, it seems that events are not bubbled through the react tree

nicolas-besnard avatar Feb 20 '24 16:02 nicolas-besnard