components
components copied to clipboard
bug(MatSelect): Mat-select click event is not happening with focus
Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
(focus)="matselectTemplateRef.open() Along with it one more click event is used. we use both event for same mat-select and on focus if we call open() then only focus is triggered for both click and focus event.
https://stackblitz.com/edit/w6h39v-nzk8nh?file=src%2Fexample%2Fselect-multiple-example.html
Reproduction
StackBlitz link: Steps to reproduce:
- Use click and focus event for same mat-select 2.On focus call matselect open() method.
Expected Behavior
On click , click event to be triggered.
Actual Behavior
On click, focus is triggered if we use open method on focus for both click and focus
Environment
All environment
Why you are forcing the select dropdown to open upon focus? While visually it might look better, it kind of goes against how other dropdowns usually work. I would recommend not adding this behavior since it would be a bit jarring for screenreader users who are navigating a page and suddenly have an open select dropdown they did not decide to open yet. I think keeping the behavior to other select dropdowns is the best experience for users.
Closing since there hasn't been a response.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.