Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveable.dragStart(event) is not working with individualGroupable: true #967

Closed
ivadenis opened this issue Jul 2, 2023 · 3 comments
Closed
Labels
bug Something isn't working complete

Comments

@ivadenis
Copy link

ivadenis commented Jul 2, 2023

Environments

"dependencies": {
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-moveable": "0.52.1",
}

Description

I'm trying to make item drag on mouseDown event.
When individualGroupable: true, moveable.dragStart() is not working. Toggle it off, and everything works.

const onMouseDown = (e) => {
    const moveable = moveableRef.current;
    const { nativeEvent } = e;
    moveable.waitToChangeTargets().then(() => {
      moveable.dragStart(nativeEvent);
    });

    setTarget(nativeEvent.target);
  };

See: https://codesandbox.io/p/sandbox/serene-fire-zynp6k?file=%2Fsrc%2FApp.js%3A77%2C3-85%2C5

@daybrush daybrush added bug Something isn't working WIP-complete labels Jul 2, 2023
daybrush added a commit that referenced this issue Jul 2, 2023
@daybrush
Copy link
Owner

daybrush commented Jul 2, 2023

@ivadenis

  • croact-moveable 0.6.1
  • @moveable/helper 0.1.3
  • lit-moveable 0.27.1
  • moveable 0.50.1
  • preact-moveable 0.52.1
  • react-moveable 0.53.1
  • svelte-moveable 0.42.1
  • vue-moveable 2.0.0-beta.80
  • vue3-moveable 0.25.1
  • ngx-moveable 0.47.1

moveable's new version is released. Check it again.

@ivadenis
Copy link
Author

ivadenis commented Jul 3, 2023

@daybrush it works! thanks!

@ivadenis ivadenis closed this as completed Jul 3, 2023
@UreMySunshine
Copy link

it happends again in react18,sad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete
Projects
None yet
Development

No branches or pull requests

3 participants