[BUG] - Select not able to close when clicked on again
NextUI Version
2.4.2
Describe the bug
When the select menu is open, it should close when the select box is clicked again. However, the current behavior is inconsistent. This issue is also present on the Next UI website's select example.
It appears to be a consistent behavior across different instances of the select menu.
Impact: This inconsistent behavior can confuse users, as they may expect the menu to close when clicking on the select box again. It affects the overall user experience and may lead to frustration.
Please investigate this issue and provide a fix to ensure the select menu closes when the select box is clicked again.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Open the select menu by clicking on the select box.
- Click outside the popup menu. (The menu should close, which it does correctly.)
- Open the select menu again by clicking on the select box.
- Click on the select box again while the menu is open. (The menu should close, but it does not.)
Expected behavior
- When the select menu is open, clicking outside the popup menu should close it. This works as expected.
- When the select menu is open, clicking on the select box again should also close the menu.
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
@wingkwong
https://github.com/adobe/react-spectrum/issues/5988#issuecomment-1982091331 https://github.com/adobe/react-spectrum/pull/6024
@chirokas I think it's not related. We're using May release from React Aria so that fix is already included.
@wingkwong can i work on this issue?
@shambhabya reassign to you. please feel free to DM me in discord (same id) if you have any questions.
@jrgarciadev
"react": "^18.2.0"
"framer-motion": "^11.2.10"
"@nextui-org/react": "^2.4.6",
If disableAnimation is applied to Select, the same phenomenon occurs.
Also click fast three times It works differently than what's on the homepage (event that opens and closes doesn't wait for animation)
Or compare the workings of the streetbook and the homepage storybook nextui nextui homepage
Why is this still happening on mobile in 2.6.10 ?
Hi ! I have the same issue in mobile, when I click the select box, the items list doesn't close. Works fin on desktop "@heroui/react": "2.6.14",
Someone know if there's a solution or if there'll be a patch ?
I'm also having this issue on mobile "@heroui/react": "2.6.14",
I have the same issue, when on mobile. The desktop works just normal
this is not fixed, i have the same issue on mobile
@galjeza currently the fix is in beta version. will release in 2.8.0.