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
26.07k stars 1.67k forks source link

Clicking a node doesn't select the node #4436

Closed arikchakma closed 4 months ago

arikchakma commented 4 months ago

What platform were you using when you found the bug?

Live code example

https://codesandbox.io/s/xyflow-react-select-node-c7jvlg?file=/number-input.js:108-121

Describe the Bug

Clicking a node doesn't select the node if you have panOnDrag={false} panOnScroll={true} selectionOnDrag={true} instead it selects the pane element. Before migrating to v12 it was working fine. Even the onClick event doesn't get fired.

Steps to reproduce the bug or issue

  1. Click any node
  2. Notice that the node doesn't turn red i.e. not selected.
  3. Also look at the console the node click event doesn't get triggered.

Expected behavior

As a user, I expected that when I click any node it should select the node and turn red.

Screenshots or Videos

https://github.com/xyflow/xyflow/assets/54026804/cfc038cc-269d-482d-a088-6468fc32ed46

Additional context

No response

moklick commented 4 months ago

Could you try 12.0.1?

arikchakma commented 4 months ago

It works fine now, we're still migrating to v12. We will let you know if we face any other issues. Thanks for the reply.

moklick commented 4 months ago

Perfect :)