-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] - DropdownMenu animates in wrong direction on first open (auto placement) #4251
Comments
I did some further testing. This bug only occurs when "placement" prop is omitted. If you set placement="asdfasdfsdaf" to a random string, it is fixed. For now I will just set placement to "auto" even though "auto" isn't a documented or legal value for placement prop |
This does not solve the problem, the initial animation just changed from "flashing from the top" to "flashing from the automatic position". If the |
The |
@wingkwong Sorry to bother you, may I ask if there is any progress? As a UI library focused on aesthetics, this issue should be prioritized just like any non-functional feature. For components like |
@AnYiEE @daveycodez anyone can share a video or a reproducible sandbox on latest version? and is it a desktop or a mobile issue? thanks. |
@wingkwong It can be reproduced on both desktop and mobile devices. Sorry, I don't have the minimal reproduction environment at the moment, but I can provide a project branch that can reproduce the issue, and you can reproduce locally. Build this branch locally, then go to the |
@wingkwong This is a screen recording. It shows the first click and the second click. |
It seems to work correctly in the Docs. dropdown-example.mov |
@AnYiEE |
@ryo-manba Yes, the examples in the document are normal. But for me, version 2.4 is also normal, and it is true that 2.6 is not. For the first click, the animation is bottom-up, as if the trigger is below the popup, but subsequent clicks are normal. |
@ryo-manba In the screen recording, the left side is 2.6, and the right side is 2.4. You can see the difference in the first animation, as well as the difference between the second and first clicks on the same card. The second click will be the same as 2.4. 2024-12-09_14-09-46.mp4 |
@AnYiEE |
@AnYiEE |
@ryo-manba here is a codesandbox with what I think is the issue mentioned here. Seems that first popup animation is the default placement animations, regardless of where placement actually is. |
@ryo-manba Combined with the reproduction environment provided by @Peterl561, it seems that when displaying the initial animation, the animation starts from the |
At the same time. For me, in version 2.4, I could pass |
Hey @AnYiEE , |
@ryo-manba As a member, you should have the permission to directly separate other new issues from this issue? And from the sandbox above, it can be seen that the |
NextUI Version
2.6.3
Describe the bug
Whenever you open a DropdownMenu that does not have placement set (auto placement) it always animates downwards on the first render, then correctly animates upwards on sequential renders. Even if it is on the bottom of the page and rendering to "top", it will always render downwards first. The only way to fix this is to hardcode placement for the Dropdown, but sometimes you want auto placement if the user is scrolling or on mobile. This is a new issue introduced in 2.6
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
above
Expected behavior
Dropdown menu should always animate in the correct direction it is appearing in
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: