Skip to content

Commit 0886cef

Browse files
crisbetovivian-hu-zz
authored andcommitted
fix(autocomplete): dividers in list throwing off keyboard navigation (#13224)
Since we count on the options being a particular height, having 1px dividers between them ends up throwing off the keyboard navigation. These changes add an offset to the dividers to avoid the issue. Fixes #13200.
1 parent 6da7d23 commit 0886cef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/autocomplete/autocomplete.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ $mat-autocomplete-panel-border-radius: 4px !default;
3232
border-top-right-radius: $mat-autocomplete-panel-border-radius;
3333
}
3434

35+
// We need to offset horizontal dividers by their height, because
36+
// they throw off the keyboard navigation inside the panel.
37+
.mat-divider-horizontal {
38+
margin-top: -1px;
39+
}
40+
3541
@include cdk-high-contrast {
3642
outline: solid 1px;
3743
}

0 commit comments

Comments
 (0)