Skip to content

Commit

Permalink
fix(autocomplete): dividers in list throwing off keyboard navigation (a…
Browse files Browse the repository at this point in the history
…ngular#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 angular#13200.
  • Loading branch information
crisbeto authored and roboshoes committed Oct 23, 2018
1 parent 661201d commit a8020f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/autocomplete/autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ $mat-autocomplete-panel-border-radius: 4px !default;
border-top-right-radius: $mat-autocomplete-panel-border-radius;
}

// We need to offset horizontal dividers by their height, because
// they throw off the keyboard navigation inside the panel.
.mat-divider-horizontal {
margin-top: -1px;
}

@include cdk-high-contrast {
outline: solid 1px;
}
Expand Down

0 comments on commit a8020f6

Please sign in to comment.