From 0886cef8e90e57f9fd4cbd63e4d612ffa0576088 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 2 Oct 2018 19:36:37 +0200 Subject: [PATCH] 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. --- src/lib/autocomplete/autocomplete.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/autocomplete/autocomplete.scss b/src/lib/autocomplete/autocomplete.scss index 8a80d634f54..f677703ba2b 100644 --- a/src/lib/autocomplete/autocomplete.scss +++ b/src/lib/autocomplete/autocomplete.scss @@ -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; }