mirror of
https://github.com/zen-browser/desktop
synced 2026-04-25 17:15:00 +02:00
Fix other popover layou issues (gh-12923)
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user