fix: use non-passive wheel listener to prevent page scroll during diagram zoom

React's onWheel is passive by default, so preventDefault() doesn't stop
page scrolling. Attach native wheel listener with { passive: false } via
useEffect instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-27 19:24:09 +01:00
parent 021a52e56b
commit f675451384
2 changed files with 15 additions and 9 deletions

View File

@@ -193,8 +193,8 @@ export function ProcessDiagram({
)}
<svg
ref={zoom.svgRef}
className={styles.svg}
onWheel={zoom.onWheel}
onPointerDown={zoom.onPointerDown}
onPointerMove={zoom.onPointerMove}
onPointerUp={zoom.onPointerUp}