DragDrop icon indicating copy to clipboard operation
DragDrop copied to clipboard

unbind doesn't work

Open bryanlarsen opened this issue 11 years ago • 3 comments

calling DragDrop.unbind crashes with 'binding is not defined'

https://github.com/kbjr/DragDrop/blob/master/drag-drop.js#L284

bryanlarsen avatar Jul 03 '14 20:07 bryanlarsen

the fix for that crash is obvious, binding should be the value of bindings[id] before null is assigned.

However, on the next line there is an undefined 'e' that's not so obvious to fix.

I gather that nobody has ever used unbind? I assume that I have to call unbind to clean up after myself, or does it automatically clean up if I remove the element from the DOM? Memory usage is important, this is a long lived webapp.

bryanlarsen avatar Jul 03 '14 20:07 bryanlarsen

The problem is that this library has had several updates, a lot of which coming from pull requests, and I haven't had a chance to test everything and make sure its all still working. I'll take a look and see what I can do.

kbjr avatar Jul 04 '14 21:07 kbjr

This library need a new major release anyway, I might just do that.

kbjr avatar Jul 04 '14 21:07 kbjr