Skip to content

Commit

Permalink
refactor: moves stopPropagation to initDrag function
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamilenkovic committed Feb 28, 2024
1 parent 0f305fc commit bacf9bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ export function remapFinished() {
export function handleDragstart<T>(data: NodeEventData<T>) {
if (!(data.e instanceof DragEvent)) return;

data.e.stopPropagation();

dragstart({
e: data.e,
targetData: data.targetData,
Expand All @@ -413,6 +411,8 @@ export function dragstartClasses(
export function initDrag<T>(eventData: NodeDragEventData<T>): DragState<T> {
const dragState = setDragState(dragStateProps(eventData.targetData));

eventData.e.stopPropagation();

if (eventData.e.dataTransfer) {
eventData.e.dataTransfer.dropEffect = "move";

Expand Down

0 comments on commit bacf9bc

Please sign in to comment.