prevwong / craft.js

🚀 A React Framework for building extensible drag and drop page editors
https://craft.js.org
MIT License
7.56k stars 733 forks source link

Avoid animation of the element snapping back to its origin position when element is dropped. #620

Closed fpoirier1 closed 4 months ago

fpoirier1 commented 6 months ago

First and for most, this library is a state of the art, thank you very much!

Describe the bug When dropping an element, there is an animation of the element snapping back to its origin position before the change happens.

To Reproduce Steps to reproduce the behavior:

  1. Go to demo example (https://craft.js.org/examples/basic)
  2. Drag the 'Click me' button far to the bottom of the page
  3. You see the placeholder going back to is original position before being moved under the 'It's me again!' block.

Expected behavior We would expect the change to happens instantaneously.

Screenshots https://github.com/prevwong/craft.js/assets/1587658/33bdea05-96a5-4902-9662-b634f8bb2409

Your environment

Software Version(s)
craft.js 0.2.5
React 18.2.0
TypeScript
Browser Chrome
npm/Yarn
Operating System Mac OSX
prevwong commented 4 months ago

Fixed in #634!