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

Dialog adds unnecessary overflow:hidden to HTML root element even if it's hidden initially #1676

Closed
ItsRyanWu opened this issue Jul 15, 2022 · 1 comment · Fixed by #1681
Closed
Assignees

Comments

@ItsRyanWu
Copy link

ItsRyanWu commented Jul 15, 2022

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

1.6.6

What browser are you using?

Chrome, Safari, etc

Reproduction URL

https://codesandbox.io/s/determined-ardinghelli-ftl8nn?file=/src/App.js

Describe your issue

When combining Dialog and Transition components together and declare unmount: false then the Dialog will always add overflow:hidden to HTML root element when users are first landed on the page and result in a non-scrollable page, which is confusing and not expected. After manually opening and closing the Dialog the overflow won't be added in wrong cases.

@ItsRyanWu ItsRyanWu changed the title Dialog adds unnecessary 'overflow:hidden' to HTML element even if it's hidden initially Dialog adds unnecessary overflow:hidden to HTML root element even if it's hidden initially Jul 15, 2022
@thecrypticace thecrypticace self-assigned this Jul 15, 2022
@thecrypticace
Copy link
Contributor

Hey, thanks for reporting this!

This has been fixed by #1681, and will be available in the next release!

You can try it by using our insiders build (may take a couple of minutes to publish):

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

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

Successfully merging a pull request may close this issue.

2 participants