tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.02k stars 1.03k forks source link

Scroll lock behavior change from 2.0.x to 2.1 when using Transition + TransitionChild #3346

Open mzeitlin11 opened 4 days ago

mzeitlin11 commented 4 days ago

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.1.1

What browser are you using?

N/A

Reproduction URL https://codesandbox.io/p/sandbox/silly-dust-mzj4cc

Describe your issue After updating to 2.1.1 (to take advantage of the cool new transition features, thanks!), noticed dialogs using Transition and TransitionChild no longer lock scrolling.

This issue seems to have something to do with TransitionChild - I could not recreate it solely using Transition (but not checked too thoroughly).