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

Transition component causing an error message on mobile. #1344

Closed
futuremojo opened this issue Apr 18, 2022 · 3 comments
Closed

Transition component causing an error message on mobile. #1344

futuremojo opened this issue Apr 18, 2022 · 3 comments

Comments

@futuremojo
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

"^0.0.0-insiders.b4a4e0b"

What browser are you using?

Chrome on Ubuntu and Chrome on iOS.

Reproduction URL

https://github.com/nitinpunjabi/headlessui_transition_bug

Describe your issue

Dependencies:

  • "@headlessui/react": "^0.0.0-insiders.b4a4e0b",
  • "next": "12.1.5",
  • "react": "18.0.0",
  • "react-dom": "18.0.0"

The insiders build is being used because transitions don't work otherwise with React 18. See this discussion:
#681

With the insiders version, the transition component is causing an issue on mobile. With the latest version, it doesn't work in development mode.

To recreate:

  1. Start a new Next project.
  2. Run npm install @headlessui/react@insiders
  3. Copy and paste this example into index.js: https://headlessui.dev/react/transition
  4. Start the dev server.
  5. Visit localhost:3000 on desktop and confirm it works.
  6. Visit http : // Local IP Address:port number on your mobile phone.

Expectation: same behaviour on mobile as on desktop.

Actual result: error messages.

On the mobile browser, I get this error message: https://imgur.com/a/oUKSsNg

When I use chrome://inspect to capture the console logs, I see this: https://imgur.com/a/pk48dUk

@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

This has been fixed by 591b328 and will be available in the next insiders release

@futuremojo
Copy link
Author

Thank you for the fast fix!

@TienPham18
Copy link

Thank you for your bug report! it helps

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

3 participants