Skip to content

Commit

Permalink
Before stack comparison, check if target element is in document (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
exoRift authored Sep 28, 2024
1 parent 909f014 commit fe9b677
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function recalculateIntersectingHandles({
// and the element that was actually clicked/touched
if (
targetElement !== null &&
document.contains(targetElement) &&
dragHandleElement !== targetElement &&
!dragHandleElement.contains(targetElement) &&
!targetElement.contains(dragHandleElement) &&
Expand Down

0 comments on commit fe9b677

Please sign in to comment.