can’t click on anything after closing dialog component? #headlessui

Chinmay
1 min readAug 22, 2022

Tailwind CSS @headlessui JavaScript Daily react-europe

Photo by Elisa Ventur on Unsplash

the Dialog component does not seem to clean up itself when combined with Transition (like the TailwindUI code does).

i was able to work around this by passing the Dialogcomponent, open prop as well as the Transition that wraps it.

e.g., from this:

<Transition.Root show={isOpen} as={Fragment}>
<Dialog as="div" className="relative z-30" onClose={onClose}>

to this:

<Transition.Root show={isOpen} as={Fragment}>
<Dialog as="div" className="relative z-30" open={isOpen} onClose={onClose}>

--

--

Chinmay

I often describe myself as a software professional having the mindset to break things but the toolset to create and restore.