Skip to content

[BUG] Cannot drag motion.button with drag prop #3473

@donocode

Description

@donocode

1. Read the FAQs 👇

2. Describe the bug

It is not possible to drag interactive elements like motion.button, although drag is defined on the button itself. #3448 prevents drag initiating from interactive elements but it should still be possible if the element has the drag props (rather than a non-interactive parent).

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/sghy5x

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Try to drag button, nothing happens
  2. Try to drag div, drag happens

5. Expected behavior

Button should be draggable as drag and onDrag are set directly on the button element

6. Video or screenshots

N/A

7. Environment details

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions