Skip to content

fix(editor): make canvas mouse scroll use shift-wheel sideways#127

Merged
DavidBabinec merged 2 commits into
mainfrom
fix/site-canvas-mouse-scroll
Jul 1, 2026
Merged

fix(editor): make canvas mouse scroll use shift-wheel sideways#127
DavidBabinec merged 2 commits into
mainfrom
fix/site-canvas-mouse-scroll

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • Made the design canvas mouse scroll model explicit: wheel scrolls vertically, Shift+wheel scrolls sideways, and Ctrl/Cmd+wheel still zooms.
  • Removed middle-button dragging as a canvas pan gesture, including the iframe pointer bridge path.
  • Added a shared canvas input policy helper and focused regression coverage for Shift+wheel and middle-button drag behavior.
  • Updated canvas iframe and DnD docs to stop documenting middle-click canvas panning.

Why

The canvas still treated middle-button dragging as a first-class mouse pan shortcut, which is not the expected desktop mouse scrolling model. Sideways mouse scrolling should be keyboard-modified wheel input instead.

Impact

Desktop mouse users can pan sideways with Shift+wheel across the site canvas. Space-left-drag remains available as the intentional keyboard-modified drag pan gesture; middle-button dragging no longer pans the canvas.

Verification

  • bun test src/__tests__/canvas/useCanvasWheelSync.test.tsx passed: 5 tests, 0 failures.
  • bun run build passed.
  • bun run lint passed.
  • bunx react-doctor@latest --verbose --diff passed with no changed-file issues.
  • bunx react-doctor@latest --verbose --scope changed --base main passed with no changed-file issues.
  • bun test was run and still has the pre-existing unrelated failure also present on the fresh baseline: OnboardingPanel framework import > dispatches a CMS site reload after a successful import so the editor refetches (expects a button named /import framework/i, rendered button is Import).

@DavidBabinec DavidBabinec marked this pull request as ready for review June 30, 2026 22:44
@DavidBabinec DavidBabinec merged commit f1860e9 into main Jul 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant