Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v1.7.14
What browser are you using?
Chrome
Reproduction URL
https://codesandbox.io/p/sandbox/vite-headlessui-transition-with-floatingui-flip-update-placement-bug-hjujot?file=%2Fsrc%2FApp.jsx
Open the codesandbox above and scroll to the bottom and click the "Button" twice, then scroll back to the top and click the "Button" once, here the transition is expected from bottom to top, but actually is top to bottom.
Describe your issue
Here I use Headless UI Popover with Floating UI and enable
flip
to automatically change the placement when the window scrolls, so that the Popover will appear as much as possible.My expected transition direction is: if the placement is top/top-start, it will transition from bottom to top when it is turned on; if it is bottom/bottom-start, it will transition from top to bottom when it is turned on. But when the switch is finished and the scroll window switches directions, the transition direction of opening again will not be the expected one.
Is there any way to achieve this while keeping the Headless UI usage?
Beta Was this translation helpful? Give feedback.
All reactions