react-draggable
react-draggable copied to clipboard
Dragging outside of container triggers text selection in Safari
If you are dragging an element in Safari, the cursor turns into the text selection cursor. If the elements reaches its constraints aka. its containers border and the mouse drags and moves further, outside elements get selected.
It seems that the styles added to prevent the selection are not working in Safari => https://github.com/react-grid-layout/react-draggable/commit/9998c562dee9aa9ab8aa2e5816ea0530ffadd105
Adding user-select: none;
to the body while the dragging happens prevents the selection from happening. Maybe this might be a solution for that problem? I could not find out why exactly the current implementation does not work in Safari, but I will report back once I found the issue.
Tested with:
- Safari 14.1.2 on macOS 11.5 (Big Sur)
- react-draggable 4.2.0 & 4.4.4 (currently latest version)