question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(mat-select): Select looses focus when activating one of children via mouse

See original GitHub issue

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/components-issue-fjmby9 (watch red/green boolean in toolbar)

Steps to reproduce:

  1. Have mat-select with mat-options
  2. Click on one of the options a. option gets de-selected

Expected Behavior

When clicking on options of select, the select gets de-focused.

Actual Behavior

When select is opened, its focus status is locked to true, until it gets closed. Upon closing the focus should be decided, whenever the focus is to be kept or not.

Clicking outside of options defocuses, esc keeps focus on select. This is the same as native select and how it works in mat-select now.

Environment

  • Angular: 10.0.3
  • CDK/Material: 10.0.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): WIndows

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, Jul 19, 2020

It’ll be reworked in terms of styling and accessibility treatment, but I think the general markup structure and events will stay more or less the same. I’ve added this to our team meeting agenda so we can figure out how we want to handle it.

0reactions
Akxecommented, Oct 15, 2020

@crisbeto Anything came from the meeting?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular: When using mat-select , Is there a way to not select ...
Angular: When using mat-select , Is there a way to not select the focused item when I press SPACE button? - Stack Overflow....
Read more >
ion-select: Select One or Multiple Value Boxes or Placeholders
ion-select is represented by selected value(s), or a placeholder, and dropdown icon. When you tap select, a dialog box appears with an easy...
Read more >
National Reading Panel - Teaching Children to Read - NICHD
Selection of prioritized topics was necessitated by the large amount of published reading research literature relevant to the. Panel's charge to determine ...
Read more >
Handling common accessibility problems - MDN Web Docs
Certain HTML features can be selected using only the keyboard — this ... and you'll lose a lot of the accessibility these elements...
Read more >
Content Jumping (and How To Avoid It) | CSS-Tricks
Few things are as annoying on the web as having the page layout unexpectedly change or shift while you're trying to view or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found