You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The draggable onend fires. Then the dropzone ondrop fires.
Actual behavior
The draggable onend calls draggableElem.unset() which seems to prevent the dropzone ondrop from firing in v1.3.0 only.
If .unset() is not called both versions work fine.
In my Production code I am calling .unset() as after an element is dropped as it can no longer be moved. It's an angular application and the draggable element and the dropzone are in different scopes/directives. Do you have any suggestions? Currently as a work around I think my best option is to use an event after dropzone ondrop which calls the correct scope and .unset() (but this seems a bit like a hack).
System configuration
Using Chrome - Version 62.0.3202.94 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
I updated interactjs from 1.2.8 to 1.3.3 and it seems that the dropzone.ondrop handler is always called before the the draggable.onend event.
Can you tell me if I'm wrong?
If not, do you have any suggestion to bring back the previous flow?
@JulienBier starting in 1.3.3 dragend is fired beforedrop. To check if a drop happens with the dragend event you can do:
interact(target).on('dragend',event=>{if(event.dropzone){// you can do what you used to do in the drop listener here insteadconsole.log(event.dropzone,event.relatedTarget);}});
I've found an inconsistency between Interact.js v1.3.0 and v1.2.9.
I've created the following codePen which illustrates the issue:
https://codepen.io/steveHornseyDev/pen/VrGjXP
It is based off an example on http://interactjs.io/ and in v1.2.9 it works fine and in v1.3.0 it is broken
Expected behavior
The draggable onend fires. Then the dropzone ondrop fires.
Actual behavior
The draggable onend calls draggableElem.unset() which seems to prevent the dropzone ondrop from firing in v1.3.0 only.
If .unset() is not called both versions work fine.
In my Production code I am calling .unset() as after an element is dropped as it can no longer be moved. It's an angular application and the draggable element and the dropzone are in different scopes/directives. Do you have any suggestions? Currently as a work around I think my best option is to use an event after dropzone ondrop which calls the correct scope and .unset() (but this seems a bit like a hack).
System configuration
Using Chrome - Version 62.0.3202.94 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: