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