xyflow / xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.
https://xyflow.com
MIT License
21.84k stars 1.45k forks source link

Zoom: CTRL + SCROLL with pan activated only works if clicked on pane before #4170

Closed ra03ah closed 1 month ago

ra03ah commented 1 month ago

Describe the Bug

CTRL + SCROLL doesn't zoom but pan, if the pane wasn't clicked before

Your Example Website or App

https://reactflow.dev/examples/interaction/interaction-props

Steps to Reproduce the Bug or Issue

  1. activate zoomOnScroll and panOnScroll
  2. Remove focus from the view (e.g. clicking outside of the page)
  3. Move the cursor to the view
  4. CTRL + SCROLL

Expected behavior

It should zoom when CTRL + SCROLL is used without clicking on the pane before.

Screenshots or Videos

No response

Platform

Additional context

If the panOnScroll is false, the zoom works without any issues

ra03ah commented 1 month ago

could someone reproduce this?