authorgravatar for saikrisha.ambeti1@gmail.comSaikrishna Ambeti <saikrisha.ambeti1@gmail.com> 2026-10-12 07:23:59+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-12 01:53:59+00:00
logfd6d9ddaab241f60a1ad3c2b7b1d836cf871447f
tree1909268c3a2addc474c7afedaef7848024c6790b
parent4ff8b077d523cfe661c5c2e3222b3086d5bff5f5
signature Signed by PGP key B5690EEEBB952194

fix(web): hide stash menu behind maximized panel (#18115)

Co-authored-by: maria <maria@kuuro.net>

1 files changed, 6 insertions(+), 1 deletions(-)

apps/web/src/components/chat/ChatComposer.tsx+6-1
...@@ -1017,6 +1017,11 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:...@@ -1017,6 +1017,11 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
1017 window.getComputedStyle(form ?? anchor).getPropertyValue("--chat-composer-drawer-inset"),1017 window.getComputedStyle(form ?? anchor).getPropertyValue("--chat-composer-drawer-inset"),
1018 );1018 );
1019 const drawerInset = drawerInsetRem * rootFontSizePx;1019 const drawerInset = drawerInsetRem * rootFontSizePx;
1020 const width = rect.width - drawerInset * 2;
1021 if (width <= 0) {
1022 setPosition(null);
1023 return;
1024 }
1020 // One extra pixel prevents fractional layout coordinates from exposing1025 // One extra pixel prevents fractional layout coordinates from exposing
1021 // the canvas between the drawer mask and the composer's foreground edge.1026 // the canvas between the drawer mask and the composer's foreground edge.
1022 // Mirrors --chat-composer-attachment-overlap: calc(1rem + 1px).1027 // Mirrors --chat-composer-attachment-overlap: calc(1rem + 1px).
...@@ -1025,7 +1030,7 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:...@@ -1025,7 +1030,7 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
1025 bottom: window.innerHeight - rect.top - composerOverlap,1030 bottom: window.innerHeight - rect.top - composerOverlap,
1026 left: rect.left + drawerInset,1031 left: rect.left + drawerInset,
1027 maxHeight: Math.max(96, rect.top - 24 + composerOverlap),1032 maxHeight: Math.max(96, rect.top - 24 + composerOverlap),
1028 width: Math.max(0, rect.width - drawerInset * 2),1033 width,
1029 };1034 };
1030 setPosition((current) =>1035 setPosition((current) =>
1031 current && composerCommandMenuPositionsEqual(current, next) ? current : next,1036 current && composerCommandMenuPositionsEqual(current, next) ? current : next,