-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to Select and copy Text or click a link inside a Node. #4044
Comments
Did you try using |
No no, I didn't. where should I use them btw? As a className or as a prop to the |
These are class names that you can apply to elements where you want to disable initiating drag/pan. See this section of the docs. |
Hmm interesting, it disabled the dragging but didn't solve my issue. i am still not able to select text using my cursor. |
Mh... works fine for me: https://codesandbox.io/p/sandbox/cranky-elbakyan-s65tzg?file=%2Fsrc%2Fnodes%2FPositionLoggerNode.tsx%3A18%2C31 Screen.Recording.2024-03-20.at.15.55.14.movEdit: Sry had the wrong clip in it before ^^ |
Thanks so much for the demo with the Codesandbox brother, but I was actually trying to copy the label, in this case, i want to copy the text "drag me!" or "wire". If there is any way we can make them selectable by mouse that would be helpful. |
Try this: <div style={{ userSelect: "text" }} className="nodrag nopan">
{data.label}
</div> |
Awesome ser, that worked! 🥳 |
Describe the Bug
I am trying to create a flow diagram using react-flow, everything is working fine but I am not able to interact with the data within my custom node, (copying text or clicking a link from a node). I know we have "grabbing" as a default behavior but it would be nice if we could also interact with the inner content, maybe with a double-click on a node we can select the inner text.
I have already tried adding "pointer-events: all" to my custom message, but it didn't work. If it should work then am i doing something wrong?
Steps to Reproduce the Bug or Issue
Try to select any text from a Node.
Expected behavior
Should be able to copy the text, or click on a link
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: