Keep dropdown menus clear of safe areas (#54762)

This commit is contained in:
Franck Nijhof authored and Bram Kragten committed 2026-10-09 11:11:52 +02:00
1 parent 5ba7a906d4
commit e580fb8b5c
1 file changed
+16
+16
View File
@@ -110,6 +110,22 @@ export class HaDropdown extends Dropdown {
wa-popup::part(popup) {
z-index: 200;
}
/* The auto size ignores safe areas, so a long menu could end up
behind the Android navigation bar or the notch. */
wa-popup[data-current-placement^="bottom"] #menu {
max-height: calc(
var(--auto-size-available-height) - var(
--safe-area-inset-bottom,
0px
)
) !important;
}
wa-popup[data-current-placement^="top"] #menu {
max-height: calc(
var(--auto-size-available-height) - var(--safe-area-inset-top, 0px)
) !important;
}
`,
];
}