-
-
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] - Select scrolls page and immediately closes popover on click #3571
Comments
It would appear to me like there's possibly two issues:
re 1, this only happens if the popover is long enough to scroll, i.e. removing |
I have the same issue. And had the same in previous versions. Screen.Recording.2024-07-29.at.17.20.03.mov |
That's right, I've double checked and the problem seems to have been there since the component was introduced in |
Same issue here. I agree with @hyperborea. I'm using the Select component in a sticky header and I need it to be a controlled component. I've noticed that whenever i use I'm using version |
Bump any updates having similar issues |
I'm facing the exact same problem using "@nextui-org/select": "^2.2.7". |
I have had a hard time recreating it outside the app I'm working on but here is how you might see it.
|
I'm having this problem too. using "@nextui-org/select": "^2.2.7". |
Same issue here, this is impacting UX to the point where users become frustrated. Unfortunately this makes NextUI an unusable library, which is a shame, because otherwise it's great. |
same too,Is the bug fixed? I'm still triggering this bug |
NextUI Version
2.4.6
Describe the bug
Clicking a
<Select/>
trigger, when the currently selected key is sufficiently far down the list, causes the page to scroll and the popover not to show (or more precisely, close it immediately as soon as it's opened). It sometimes also seems to select another key.When clicking the trigger again (at the new scroll position), the dropdown opens correctly. This assumes the new "stable" scroll position could actually be reached. I first encountered the issue on iOS Safari on my project where the container is
position: fixed
, so it just keeps scrolling when clicking the trigger.Note that the page will scroll down when you're at the top. If you scroll down the page enough and click the select it will scroll up instead to get the component to the same "stable" scroll position.
This issue is driving me crazy, maybe someone else has an idea what's up.
Your Example Website or App
https://stackblitz.com/edit/nextui-select-scroll-bug?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
Note: the issue ONLY appears on "7" or higher, any items further up the list are fine. In other words, the item needs to partially or fully below the scroll threshold of the popover / scroll shadow.
Expected behavior
The dropdown should open normally and the page should not scroll up.
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: