-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[joy-ui][Select] options stay open when clicking outside (Safari) #39026
Comments
Hey @danilo-leal @siriwatknp 👋 Can I take a look at this issue ? |
Sure! |
@siriwatknp I took a look at this issue, this seems to be more complicated than I thought, but I was able to find the root cause of it. So when we click the button and menu opens the focus is not kept on button and hence when we click outside of the button the blur event responsible for closing the menu is never triggered. To note: this happens on mui-base as well since it uses a similar approach. Any idea what can be causing this? Might need a little help to solve this, thanks :D |
I cannot reproduce the issue with the latest version of Safari. I tested it in Safari 17.0 and macOS Sonoma 14.0, which was released last week. |
Hi, with Safari 15.5 I can reproduce the issue. Later, I'll try with the new version of Safari. |
Yep, I tried with Safari 17.0 on Sonoma and I don't see any problem. |
I can reproduce on: MacOS Ventura 13.4.1 |
I believe the reason behind this might be that "onClose" function actually gets called with "onBlur" instead of "blur" reason. |
If you're coming here from search - just update to the latest patch if mui / joy, it's been fixed |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://mui.com/joy-ui/react-select/#basic-usage
Steps:
Current behavior 😯
The options list doesn't close when clicking outside. Only Safari is affected. Chrome works as expected.
Expected behavior 🤔
The options list should close when clicking outside the select.
Context 🔦
No response
Your environment 🌎
No response
The text was updated successfully, but these errors were encountered: