Cleaning up "draggable"
See original GitHub issueHi Bernardo, nice work!
I have one issue: If you go to: http://sslweb.azurewebsites.net/
- click the bottom left icon (sort)
- drag and drop a list-item to manually sort the list
- click again the bottom left icon to disable sorting
Result on phones (tested on android and windows phone)
- still possible to drag an item
- scrolling on the list is broken
I guess there is something wrong with the event cleanup. In the list you can find items like
<div class="win-itembox" draggable="true">
. The draggable attribute will be removed by clicking the ‘disable sorting’ icon.
How can I access the ‘DragDropTouch’ object on the ‘.win-itembox’ element to do some cleanup?
Best Regards, George
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to cleanup "react-beautiful-dnd" Draggable after removal?
I'm using this awesome react-beautiful-dnd library to let users reorder a list of items by "drag and drop". It works just fine.
Read more >Draggable doesn't clean up inline style - GSAP - GreenSock
Hey guys,. I feel like calling kill() on a Draggable instance should probably clean up after itself and reset the DOM element it...
Read more >Cleaning The Drag System On Your Spinning Reel In Just 5 ...
Is there a sweeter sound than hearing your drag scream?It's music to any angler's ears, but it only screams if your drag system...
Read more >Drag operations - Web APIs - MDN Web Docs - Mozilla
You can clear the data using the clearData() method, which takes one argument: the type of the data to remove. event.dataTransfer.clearData(" ...
Read more >How To Clean Your Spinning Reel Drag System (In Just 5 ...
Want to make sure your drag system works like new for a long time? Check out this simple process to clean and maintain...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi George
Glad you like the library.
I inspected your sample app on my Google Nexus and I think I see what the problem is. The DragDropTouch code is looking for the presence of the “draggable” attribute, not to its value. This is a bug. I thought draggable worked like “disabled” or “required”, but it does not. The attribute can be set to true or to false.
I will review the code and apply a fix ASAP.
Thanks a lot for reporting this issue.
In the meantime, if you don’t want to wait, perhaps you could try removing the draggable attribute from the elements instead of setting it to false. That should fix the problem. Hopefully…
Thank you for helping me improve the library.