Skip to content

Commit

Permalink
aborts scroll event listener on dragend
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamilenkovic committed Sep 4, 2024
1 parent 863d870 commit 05622c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,9 @@ export function handleEnd<T>(eventData: NodeEventData<T>) {
export function end<T>(_eventData: NodeEventData<T>, state: DragState<T>) {
document.removeEventListener("contextmenu", noDefault);

if (state.scrollParentAbortController)
state.scrollParentAbortController.abort();

if ("longPressTimeout" in state && state.longPressTimeout)
clearTimeout(state.longPressTimeout);

Expand Down

0 comments on commit 05622c5

Please sign in to comment.