Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

fix wrong target #914

Merged
merged 1 commit into from
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/createTippy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ export default function createTippy(
}
}

// Clicked on interactive popper
const actualTarget = (event.composedPath && event.composedPath()[0]) || event.target;

// Clicked on interactive popper
if (
instance.props.interactive &&
popper.contains(actualTarget as Element)
Expand All @@ -310,7 +311,7 @@ export default function createTippy(
}

// Clicked on the event listeners target
if (getCurrentTarget().contains(event.target as Element)) {
if (getCurrentTarget().contains(actualTarget as Element)) {
if (currentInput.isTouch) {
return;
}
Expand Down