Commit 561c680
Set the velcro overlay position:absolute from CSS to stop the first-frame jump
The hover overlay is positioned by velcro (floating-ui), but it only became
`position: absolute` inside the offset middleware — which runs *after*
floating-ui has already measured the rects on the first computePosition. So
the first frame was measured against the wrong containing block and the whole
overlay (the teal type-label tab, the select chip, the menu, the outline)
painted ~60px off, then snapped into place one frame later.
floating-ui requires the floating element to already be absolutely positioned
when it first measures. Declare `position: absolute` in the overlay's CSS so
it is in effect before velcro's first measurement; the middleware still sets
it too, harmlessly. Confirmed via frame-by-frame capture that the overlay's
own top/left was the thing jumping (526->466 between frame 0 and 1), so fixing
it here fixes every piece of chrome that rides the overlay.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent dcd6003 commit 561c680
2 files changed
Lines changed: 15 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
221 | 229 | | |
222 | 230 | | |
223 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
0 commit comments