Skip to content

Commit

Permalink
Before stack comparison, check if target element is in document
Browse files Browse the repository at this point in the history
  • Loading branch information
exoRift authored Sep 23, 2024
1 parent 7c8daad commit 999055a
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 999055a

Please sign in to comment.