What is the benefit of using HTML drag-n-drop api compared to js #2065
Unanswered
ImpossibleReality
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Why does Sortable.js by default use the HTML Drag-n-Drop API instead of mouse events along with transforms?
the HTML dnd API has many inconsistencies, and also doesn't allow for much custom behavior (like smooth animations, and removing the opacity effect). Although it may be slightly faster because it is native, it is not noticeable to end users. I am migrating one of my apps from react (and react-beautiful-dnd) to vue, and this was the only maintained vue dnd library. The animations in this library could be much smoother if js dnd was used by default. To see what I mean, take a look at the sortable animations vs react-beautiful-dnd.
And before you say I can just tell the library to use fallback by default, I am wondering why you don't swap this with useHtmlByDefault, and implement better animations/functionality to the JS dnd
Beta Was this translation helpful? Give feedback.
All reactions