Skip to content
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] - The Select component cannot be closed on mobile devices #4603

Open
AnYiEE opened this issue Jan 19, 2025 · 5 comments
Open

[BUG] - The Select component cannot be closed on mobile devices #4603

AnYiEE opened this issue Jan 19, 2025 · 5 comments
Labels
🐛 Type: Bug Something isn't working

Comments

@AnYiEE
Copy link
Contributor

AnYiEE commented Jan 19, 2025

This issue can be reproduced on the doc website. https://www.heroui.com/docs/components/select

Expected: Clicking the Select trigger can open the menu. Clicking the trigger again can close it.

Currently: After clicking to open the dropdown menu, it can only be closed by using the mouse to click the trigger, touching does not work (including simulating a touchscreen device through the console). It will quickly close and then reopen, can only be closed by clicking on other empty areas or selecting any item.

Env: Windows/Android Chrome

Copy link

linear bot commented Jan 19, 2025

@AnYiEE
Copy link
Contributor Author

AnYiEE commented Jan 19, 2025

Possible related issues: #4505

Possible related PRs: #4490

@AnYiEE
Copy link
Contributor Author

AnYiEE commented Jan 19, 2025

Note 1: It cannot even be controlled to open then close by touch the button. https://www.heroui.com/docs/components/select#controlling-the-open-state

Note 2: The Selectcomponent in the Popover component seems to be able to close normally.

@leotaozeng
Copy link

Do you find a solution to the issue?

@jprosevear
Copy link

jprosevear commented Jan 25, 2025

Some possible related notes with useAriaButton or not using it:

On both mobile and desktop onOpenChange fires more than once - 3 times on desktop (false / true / false) and 2 times on mobile (false / true); seem like some sort of state management problem

@ryo-manba ryo-manba changed the title [BUG] - The Select component cannot be closed as expected [BUG] - The Select component cannot be closed on mobile devices Jan 26, 2025
@ryo-manba ryo-manba added the Bug label Jan 26, 2025
@wingkwong wingkwong added 🐛 Type: Bug Something isn't working and removed Bug labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants