Skip to content

[BUG] snapToCursor with initial property not working #1607

@moterink

Description

@moterink

1. Read the FAQs 👇

2. Describe the bug

When using drag controls on a component which has initial coordinates, the component gets offset on drag. This behavior only happens on the first drag. Subsequent drags are snapped to the cursor correctly.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

CodeSandbox example

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Go to CodeSandbox and try to drag the container.

5. Expected behavior

The container should snap to the cursor when being dragged.

6. Video or screenshots

Framer.Motion.snapToCursor.mov

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