nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.97k stars 1.54k forks source link

[BUG] - Select not able to close when clicked on again #3276

Closed jstnhwang09 closed 4 months ago

jstnhwang09 commented 4 months ago

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

  1. Open the select menu by clicking on the select box.
  2. Click outside the popup menu. (The menu should close, which it does correctly.)
  3. Open the select menu again by clicking on the select box.
  4. Click on the select box again while the menu is open. (The menu should close, but it does not.)

Expected behavior

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

linear[bot] commented 4 months ago

ENG-1020 [BUG] - Select not able to close when clicked on again

chirokas commented 4 months ago

@wingkwong

https://github.com/adobe/react-spectrum/issues/5988#issuecomment-1982091331 https://github.com/adobe/react-spectrum/pull/6024

wingkwong commented 4 months ago

@chirokas I think it's not related. We're using May release from React Aria so that fix is already included.

shambhabya commented 4 months ago

@wingkwong can i work on this issue?

wingkwong commented 4 months ago

@shambhabya reassign to you. please feel free to DM me in discord (same id) if you have any questions.

Lucas20000903 commented 3 months ago

@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