Skip to content

Commit 5a0df4f

Browse files
committed
fix(material/autocomplete): autocomplete panel top is cut off in landscape mode
Fixes a bug in the Angular Material Autocomplete component where the autocomplete panel listbox top is cut off by the device screen when being viewed in landscape mode. This is because the listbox max-height is greater than the distance between the top of the autocomplete input and the screen top. Fixes b/284148377
1 parent 5398170 commit 5a0df4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material/autocomplete/autocomplete.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,10 @@ div.mat-mdc-autocomplete-panel {
5454
mat-autocomplete {
5555
display: none;
5656
}
57+
58+
// Prevents autocomplete panel from being cut-off from being viewed in landscape orientation.
59+
@media all and (orientation: landscape) {
60+
div.mat-mdc-autocomplete-panel {
61+
max-height: 55vh;
62+
}
63+
}

0 commit comments

Comments
 (0)