Commit 2fd8e9a
fix(studio): clamp context menu to viewport using actual rendered dimensions
Adds a useLayoutEffect that measures the context menu after render and
adjusts position if it overflows the viewport. The existing hardcoded
MENU_HEIGHT estimate was insufficient for shorter menus near the edge.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5baf2da commit 2fd8e9a
1 file changed
Lines changed: 12 additions & 1 deletion
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
| |||
0 commit comments