Fix other popover layou issues (gh-12923)

Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Lukas
2026-03-26 09:37:35 +01:00
committed by GitHub
parent 6696bc5bac
commit fb35a0b4c6

View File

@@ -338,7 +338,12 @@ window.gZenUIManager = {
// handle the constraint, enabling proper overflow scrolling.
// See gh-12782
_constrainNativePopoverHeight(panel) {
if (panel.id !== "appMenu-popup") {
const panelIds = [
"appMenu-popup",
"customizationui-widget-panel",
"widget-overflow",
];
if (!panelIds.includes(panel.id)) {
return;
}
// NSPopover adds 13px of chrome on all sides (26px vertical total),
@@ -346,7 +351,8 @@ window.gZenUIManager = {
// Previous macOS versions have similar or smaller values, so this is a
// conservative upper bound.
const popoverChrome = 26;
panel.style.maxHeight = `${window.screen.availHeight - popoverChrome}px`;
const maxHeight = window.screen.availHeight - popoverChrome;
panel.style.maxHeight = `${maxHeight}px`;
},
onPopupShowing(showEvent) {