Shopify / draggable

The JavaScript Drag & Drop library your grandparents warned you about.
https://shopify.github.io/draggable
MIT License
17.93k stars 1.09k forks source link

Make `drag:stop` cancellable #525

Closed hnrq closed 2 years ago

hnrq commented 2 years ago

Thank you for submitting a pull request! Please make sure you have read the contribution guidelines before proceeding.

This PR implements...

Makes drag:stop cancellable. Once cancelled, originalSource returns to its initial position. The item won't be moved. Also, replace HTMLNode.parentNode.removeChild(HTMLNode) with HTMLNode.remove().

This PR closes the following issues...

Addresses #524

Does this PR require the Docs to be updated?

Yes

Does this PR require new tests?

No

This branch been tested on... (click all that apply / add new items)

Browsers:

tsov commented 2 years ago

FYI: HTMLElement.remove() may not work on older browsers, but then again, maybe it's time to move on from IE11 lol