fix(web): hide stash menu behind maximized panel (#18115)
Co-authored-by: maria <[email protected]>
This commit is contained in:
1 parent
4ff8b077d5
commit
fd6d9ddaab
1 file changed
+6
-1
@@ -1017,6 +1017,11 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
|
||||
window.getComputedStyle(form ?? anchor).getPropertyValue("--chat-composer-drawer-inset"),
|
||||
);
|
||||
const drawerInset = drawerInsetRem * rootFontSizePx;
|
||||
const width = rect.width - drawerInset * 2;
|
||||
if (width <= 0) {
|
||||
setPosition(null);
|
||||
return;
|
||||
}
|
||||
// One extra pixel prevents fractional layout coordinates from exposing
|
||||
// the canvas between the drawer mask and the composer's foreground edge.
|
||||
// Mirrors --chat-composer-attachment-overlap: calc(1rem + 1px).
|
||||
@@ -1025,7 +1030,7 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
|
||||
bottom: window.innerHeight - rect.top - composerOverlap,
|
||||
left: rect.left + drawerInset,
|
||||
maxHeight: Math.max(96, rect.top - 24 + composerOverlap),
|
||||
width: Math.max(0, rect.width - drawerInset * 2),
|
||||
width,
|
||||
};
|
||||
setPosition((current) =>
|
||||
current && composerCommandMenuPositionsEqual(current, next) ? current : next,
|
||||
|
||||
Reference in new issue
Block a user