Commit 7908932
committed
fix(ux): HelpModal backdrop flicker on mousemove over canvas
User-reported (screenshot 2026-05-23 20:22): clicking '?' on a brick
in the left Palette opens the HelpModal; moving the cursor right
across the canvas underneath caused the whole screen to flicker.
Root cause: HelpModal backdrop used backdropFilter:blur(8px) on a
position:fixed inset:0 overlay. Chrome was forced to recompose the
GPU backdrop layer on every mousemove event because the React Flow
canvas underneath schedules per-frame cursor-tracking repaints —
each canvas paint invalidated the backdrop, which then forced a
fresh blur pass, looping at frame rate.
Fix:
- Drop backdropFilter:blur entirely; keep the rgba(15,23,42,0.55)
flat scrim — still visually distinct enough to anchor focus.
- Add transform: translateZ(0) + willChange: opacity to promote
the backdrop to its own compositing layer, isolating it from
the canvas paint underneath.
1 new vitest pins the contract that backdropFilter is empty and
transform contains translateZ — any future re-introduction of blur
will trip this test.1 parent 512d634 commit 7908932
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
925 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
926 | 934 | | |
927 | 935 | | |
928 | 936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
43 | 57 | | |
0 commit comments