Skip to content
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

No drag cursor on first render #711

Open
Pivigor opened this issue Nov 5, 2023 · 6 comments
Open

No drag cursor on first render #711

Pivigor opened this issue Nov 5, 2023 · 6 comments

Comments

@Pivigor
Copy link

Pivigor commented Nov 5, 2023

Expected behavior

When you hover over the Draggable element, you see the drag cursor.

Actual behavior

When you hover over a Draggable element, you see a regular cursor. Drag cursor appears only after the first move/first touch of the element.

Steps to reproduce

I just used this example in a regular React app (not Next.js as in the example):
https://ui.mantine.dev/component/dnd-list/

Suggested solution?

I'm not really sure. Maybe this is a problem in my configuration. But I am not familiar with this library and this problem is not obvious to me.
What I found:

  1. The cursor appears in html style with the attribute data-rfd-dynamic=":r1:"
  2. When the page is rendered for the first time, the style data-rfd-always=":r1:" is present, but there is no data-rfd-dynamic=":r1:" and no drag cursor style
  3. The style data-rfd-dynamic=":r1:" with drag cursor appears only when the first interaction with the Draggable element occurs
    It is not obvious to the end user that this element is interactive

What version of React are you using?

"react": "18.2.0"

What version of @hello-pangea/dnd are you running?

"@hello-pangea/dnd": "^16.3.0"

What browser are you using?

Google Chrome

Demo

https://codesandbox.io/s/vertical-list-forked-nlzdqq?file=/index.tsx

@CripyIce
Copy link

CripyIce commented Nov 8, 2023

Having the same issue

@Leoplazavzla
Copy link

Any news on this? This bug is giving me a hard time at this very moment :-)

@albanlorillard
Copy link

Same after migrating from react-beautiful-dnd
As a temporary workaround, I forced the cursor: grab; on the CSS of my draggable element

@likerRr
Copy link

likerRr commented Sep 16, 2024

Still relevant. Cursor styles (cursor: grab) are not applying until the first interaction

@dfrazao
Copy link

dfrazao commented Oct 1, 2024

Also happening on my end

@kmsimpel
Copy link

kmsimpel commented Nov 1, 2024

Same issue here

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

No branches or pull requests

7 participants