bokuweb / react-rnd

🖱 A resizable and draggable component for React.
https://bokuweb.github.io/react-rnd/stories
MIT License
3.94k stars 325 forks source link

Incorrect cursor when dragging on safari browser #856

Open amatelic opened 2 years ago

amatelic commented 2 years ago

Overview of the problem

I'm using react-rnd 10.3.5

My browser is: Safari Version 15.3 (17612.4.9.1.8)

Reproduced project

Code can be reproduced here https://codesandbox.io/s/y3997qply9

Description

On safari, the cursor is incorrect when dragging. Rather than having the move cursor, we have a text cursor.

Steps to Reproduce

  1. Open link
  2. Start dragging div.

Expected behavior

Should see the move/dragging cursor.

Actual behavior

Seeing the edit cursor.

briskajanis1 commented 1 year ago

Just add e.preventDefault() on your drag handler. That fixes the issue.