Skip to content

Commit a5ab829

Browse files
crisbetowagnermaciel
authored andcommitted
fix(material/select): remove focus outline on panel (#21005)
The panel has a focus outline since it has `tabindex="-1"`. We generally don't keep focus on it so the outline isn't shown, but it can happen if the user clicks on the scroll bar. These changes remove the outline. (cherry picked from commit 44b7e1a)
1 parent 36cb325 commit a5ab829

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/material-experimental/mdc-select/select.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ $mat-select-placeholder-arrow-space: 2 * ($mat-select-arrow-size + $mat-select-a
7070
width: 100%; // Ensures that the panel matches the overlay width.
7171
max-height: $mat-select-panel-max-height;
7272
position: static; // MDC uses `absolute` by default which will throw off our positioning.
73+
outline: 0;
7374

7475
// Note that we include this private mixin, because the public
7576
// one adds a bunch of styles that we aren't using for the menu.

src/material/select/select.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ $mat-select-placeholder-arrow-space: 2 * ($mat-select-arrow-size + $mat-select-a
9696
max-height: $mat-select-panel-max-height;
9797
min-width: 100%; // prevents some animation twitching and test inconsistencies in IE11
9898
border-radius: 4px;
99+
outline: 0;
99100

100101
@include cdk-high-contrast(active, off) {
101102
outline: solid 1px;

0 commit comments

Comments
 (0)