Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Unable to Select Text Within Draggable Elements #2680

@Vituli

Description

@Vituli

Expected behavior

Text inside draggable elements should be selectable for copy without interfering with drag functionality.

Actual behavior

Text within draggable elements is not selectable because the library captures mouse events for dragging, preventing text selection.

Steps to reproduce

  1. Create a draggable element using Draggable from react-beautiful-dnd.
  2. Add a text element inside the draggable element.
  3. Attempt to select the text using the mouse.
  4. Notice that the text cannot be selected because the drag event is triggered.

Suggested solution?

Add a prop like allowTextSelection or provide a built-in way to allow text selection within draggable elements without needing to manually stop propagation.

Current workaround:

<Draggable draggableId="item-1" index={0}>
  {(provided) => (
    <div ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}>
      <span onMouseDown={(e) => e.stopPropagation()}>Selectable Text</span>
    </div>
  )}
</Draggable>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions