Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mzeitlin11 opened this issue Jun 28, 2024 · 3 comments
Assignees

Comments

@mzeitlin11
Copy link

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.

  • In the CodeSandbox link above using 2.1.1, the background can still be scrolled when the dialog is open.
  • If you downgrade to 2.0.4 in the sandbox , the background cannot be scrolled.

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

@RobinMalfait RobinMalfait self-assigned this Jul 1, 2024
@steve-marmalade
Copy link

Thanks @mzeitlin11 , I came here to report this exact issue. Were you able to find a workaround?

@Tittoh
Copy link

Tittoh commented Sep 3, 2024

Looks like this has been resolved. I upgraded to 2.1.3 and it doesn't scroll anymore.

@short-dsb
Copy link

Unfortunately, upgrading to 2.1.3 doesn’t seem to be a workaround for us due to #3437.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants