Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
fix: allow dropping draggables on regular elements, not only on custo…
Browse files Browse the repository at this point in the history
…m elements
  • Loading branch information
erik-lieben committed Sep 22, 2016
1 parent 19193b1 commit ee54e8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dropzone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export class DropzoneCustomAttribute {
event.relatedTarget.classList.remove("drop--me");
})
.on("drop", event => {
if (typeof(event.relatedTarget.au.controller) === "object" && typeof(event.relatedTarget.au.controller.viewModel) === "object") {
if (typeof(event.relatedTarget.au.draggable.viewModel) === "object" && typeof(event.relatedTarget.au.draggable.viewModel.value) === "object") {

this.element.dispatchEvent(
new CustomEvent("drop", {
bubbles: true,
detail: event.relatedTarget.au.controller.viewModel,
detail: event.relatedTarget.au.draggable.viewModel.value,
})
);
}
Expand Down

0 comments on commit ee54e8b

Please sign in to comment.