draggable icon indicating copy to clipboard operation
draggable copied to clipboard

Bug on edge explorer after upgrade npm library from 1.0.0.beta.5 to 1.0.0.beta.7

Open albertodarblade opened this issue 6 years ago • 6 comments

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?

image

my current version of the library is 1.0.0-beta.7, downgrade to the version 1.0.0-beta.5 works fine. :(

albertodarblade avatar Jun 19 '18 22:06 albertodarblade

@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

tsov avatar Jun 19 '18 22:06 tsov

image this is the error expanded, I only using 'sortable:stop' event handler, as you can see in the snap of my code. image

albertodarblade avatar Jun 19 '18 22:06 albertodarblade

image

albertodarblade avatar Jun 19 '18 22:06 albertodarblade

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

tsov avatar Jun 20 '18 17:06 tsov

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

H-Lo avatar Jun 30 '19 14:06 H-Lo

I'm also getting the error, please help me to resolve this Screenshot 2020-07-16 at 9 32 22 AM

jafaruddeen avatar Jul 16 '20 04:07 jafaruddeen