draggable
draggable copied to clipboard
Bug on edge explorer after upgrade npm library from 1.0.0.beta.5 to 1.0.0.beta.7
Draggable caught errors while triggering 'drag:over:container' TypeError: Function expected
Is the error than appears on my console and I am unable to sort again could you help me with this issue please?
my current version of the library is 1.0.0-beta.7, downgrade to the version 1.0.0-beta.5 works fine. :(
@albertodarblade Oh interesting, are you doing anything on event handlers?
Also, could you send a screenshot with the error message expanded? That way we can see what is failing and get a better of the issue
this is the error expanded, I only using 'sortable:stop' event handler, as you can see in the snap of my code.
This error doesn't seem related to your code, probably an issue with draggable on Edge. Will check this out later and see what needs fixing. The actual Edge error message is not really helpful unfortunately
Thanks for reporting
Hi! Maybe I have solution for you. Got the same error and finally found out what's going on - I have UL with LI items that are sortable. So the logical way to initialize is to put container as a selector for items. But during the drag and sort, the plugin creates 3 temporary help items that are not the part of my list which are also affected with event handlers, but they shouldn't be. So I added a class to each item ("Photo") and during setup I set the draggable item to ".Photo" which now means not all LI items but only mine items marked with "Photo".
JavaScript to initialize: const sortable = new Draggable.Sortable( document.querySelectorAll( "ul.Photos" ), { draggable: "li.Photo", swapAnimation: { duration : 500, easingFunction : "ease-in-out", horizontal : true }, plugins : [ Plugins.SwapAnimation ] } );
After that no error occured. Hope it helps.
BR, Hrvoje
I'm also getting the error, please help me to resolve this