nextui icon indicating copy to clipboard operation
nextui copied to clipboard

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

Open jstnhwang09 opened this issue 1 year ago • 5 comments

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

  • 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

jstnhwang09 avatar Jun 18 '24 14:06 jstnhwang09

@wingkwong

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

chirokas avatar Jun 19 '24 13:06 chirokas

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

wingkwong avatar Jun 20 '24 05:06 wingkwong

@wingkwong can i work on this issue?

shambhabya avatar Jun 22 '24 13:06 shambhabya

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

wingkwong avatar Jun 22 '24 13:06 wingkwong

@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

Lucas20000903 avatar Aug 07 '24 05:08 Lucas20000903

Why is this still happening on mobile in 2.6.10 ?

webinoo avatar Dec 30 '24 14:12 webinoo

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 ?

o6ris avatar Feb 03 '25 18:02 o6ris

I'm also having this issue on mobile "@heroui/react": "2.6.14",

willmillar avatar Mar 11 '25 17:03 willmillar

I have the same issue, when on mobile. The desktop works just normal

lubomirmolin avatar May 17 '25 17:05 lubomirmolin

this is not fixed, i have the same issue on mobile

galjeza avatar May 26 '25 06:05 galjeza

@galjeza currently the fix is in beta version. will release in 2.8.0.

wingkwong avatar May 26 '25 12:05 wingkwong