Commit 1e70fb5
fix(website): bridge the dead zone between a nav trigger and its panel
The desktop nav's panel shell hung off `top: 100%` of the nav row, so the
row's own `py-4 md:py-5` padding sat between the trigger's bottom edge and
the panel's top edge belonging to neither element. Crossing it fired
mouseleave on .nav-desktop and scheduled a close; only arriving at the panel
could cancel it. A traverse slower than the 150ms grace therefore dismissed
the panel mid-move and left the pointer over empty space with nothing left
to fire mouseenter on — the panel was gone and did not come back. That is a
real defect for anyone moving their mouse deliberately, and it turned main
red: nav-panels.spec.ts failed all three attempts on CI while passing on
faster local hardware.
The fix removes the gap rather than lengthening the timeout. A longer grace
would only move the threshold and stay broken for a slower movement. Instead
.nav-panel-shell starts its box at the trigger row's bottom edge and pays the
difference back as transparent top padding, so the band is part of the shell
and mouseenter fires the instant the pointer leaves the trigger. The visible
.nav-panel does not move: measured at y=80 on marketing and y=57 on docs both
before and after. The new --nav-row-pad tracks the row's real padding (16px,
20px from md, and a flat 16px inside docs, which flattens the step).
.nav-desktop also gains `align-self: stretch`. The row is items-center, so on
docs — where the 25px logo sets the content height — that box floated 2.5px
above where the bridge begins, leaving a smaller copy of the same dead zone.
Stretching pins the two hit areas together and moves nothing, since the links
stay centred by the element's own items-center.
The test now crosses the band deliberately slowly — three stops of 120ms,
past CLOSE_DELAY_MS — so it asserts the bridge rather than the speed of the
machine it runs on. Verified by reverting the CSS: the strengthened test
fails against the old geometry and passes against the new.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 03b5796 commit 1e70fb5
2 files changed
Lines changed: 70 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
112 | 142 | | |
113 | 143 | | |
114 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| |||
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| |||
399 | 414 | | |
400 | 415 | | |
401 | 416 | | |
402 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
403 | 426 | | |
404 | 427 | | |
405 | 428 | | |
| |||
513 | 536 | | |
514 | 537 | | |
515 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
516 | 551 | | |
517 | 552 | | |
518 | 553 | | |
| |||
0 commit comments