Skip to content

Commit

Permalink
fix(autocomplete): dividers in list throwing off keyboard navigation
Browse files Browse the repository at this point in the history
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 committed Sep 20, 2018
1 parent 411fce3 commit 1d4f591
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 1d4f591

Please sign in to comment.