Transitioned slideovers don't animate correctly
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
1.0
What browser are you using?
Chrome
Reproduction repository
Non-public
It looks like slideovers that are transitioned and implemented with Dialog don't animate correctly. It looks like this is an issue with the default focus behavior, mixing with browser behavior. The browser will scroll the element into view, despite it transitioning into view. It seems like the focus trap in the modal should use the NoScroll functionality.
I tested this using the examples provided in TailwindUI.
I'm also having an issue with slide-over animation - doesn't sound like I'm seeing exactly the same thing but maybe it's related? Also using @headlessui/react 1.0, Chrome and Firefox (didn't test other browsers). If it matters, I'm using the postcss7-compat version of tailwind.
To help you reproduce the issue: The below gif is basically just using the react Tailwind UI code (Slide-overs -> With background overlay), plus a button to open.

Also - Congrats on the release!
@reczy can you open a separate issue for this?
@RobinMalfait absolutely - #357.
Thanks!
@kesne Hey! Thank you for your bug report! Much appreciated! 🙏
While the NoScroll is a solution it is not a good solution. We've updated the examples on https://tailwindui.com to fix these issues. Checkout https://github.com/tailwindlabs/headlessui/issues/357#issuecomment-820532374 for the quick fix.
Reasons why the NoScroll is not a good enough option for now:
- When you have a slide-over that contains an input in a scrollable section, then the transition would work. But the input would be focused but not visible to the end user.
- Sadly, the
preventScroll: truedoesn't work on Safari
We are investigating a better solution that fixes this issue in a more robuust way. Going to close it for now since the fixed applied to the examples in https://tailwindui.com seem to have fixed the main issue for this component.