diff --git a/js/components/DropTarget.tsx b/js/components/DropTarget.tsx index 5c9c27e8..c9dddcf4 100644 --- a/js/components/DropTarget.tsx +++ b/js/components/DropTarget.tsx @@ -19,12 +19,14 @@ export default class DropTarget extends React.Component { handleDrop = (e: React.DragEvent) => { this.supress(e); - const { target } = e; - if (!(target instanceof Element)) { + // TODO: We could probably move this coordinate logic into the playlist. + // I think that's the only place it gets used. + const { currentTarget } = e; + if (!(currentTarget instanceof Element)) { return; } - const { left: x, top: y } = target.getBoundingClientRect(); + const { left: x, top: y } = currentTarget.getBoundingClientRect(); this.props.handleDrop(e, { x, y }); };