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(MatSelect): Mat-select click event is not happening with focus #28985

Closed
1 task
Sathishhari196 opened this issue May 1, 2024 · 2 comments
Closed
1 task
Labels
area: material/select needs: clarification The issue does not contain enough information for the team to determine if it is a real bug

Comments

@Sathishhari196
Copy link

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:

  1. 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

@Sathishhari196 Sathishhari196 added the needs triage This issue needs to be triaged by the team label May 1, 2024
@amysorto
Copy link
Contributor

amysorto commented May 6, 2024

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.

@amysorto amysorto added needs: clarification The issue does not contain enough information for the team to determine if it is a real bug area: material/select and removed needs triage This issue needs to be triaged by the team labels May 6, 2024
@crisbeto
Copy link
Member

Closing since there hasn't been a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/select needs: clarification The issue does not contain enough information for the team to determine if it is a real bug
Projects
None yet
Development

No branches or pull requests

3 participants