-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[material-ui][Autocomplete] Listbox opens and closes on click when used with limitTags
#42432
Comments
openOnFocus
prop doesn't work when used with limitTags
I can reproduce it in the documentation: https://mui.com/material-ui/react-autocomplete/#limit-tags. The issue is with |
openOnFocus
prop doesn't work when used with limitTags
limitTags
limitTags
limitTags
It's a regression from #36369 |
still the bug exist ? |
Yes. It's being fixed in #42494. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @gguiceuna! How was your experience with our support team? |
Steps to reproduce
Link to live example: (required)
https://stackblitz.com/edit/react-u4moum?file=Demo.tsx
Steps:
Current behavior
The Listbox containing options will briefly flash, and close itself when all of the tags (chips) are revealed.
Expected behavior
The listbox containing options should remain open.
Context
This bug only occurs when clicking the input to focus. Using the keyboard (tab) does not replicate the bug. Also, you can occasionally see the listbox flash open and then close quickly when using the mouse to focus. Additionally, it seems if you click far enough to the right in the input the bug does not occur. I've found if I'm selecting options with shorter "titles" (using demo data) it makes the bug more difficult to replicate. It feels as though clicking the input in a location where when all of the chips are revealed and a chip will exist is what causes the bug.
In the attached screen shots if I click in the red box the bug will replicate. If I click where the blue box is (which is clearly to the right of where the Pulp Fiction chip will render) the bug does not replicate.
Your environment
Using Chrome (can replicate on StackBlitz using the Limit Tags demo page with openOnFocus set to true.
npx @mui/envinfo
Search keywords: autocomplete, openOnFocus, limitTags
The text was updated successfully, but these errors were encountered: