Skip to content

Commit

Permalink
Fix the player’s fuzzy matching detecting segments inside its own title
Browse files Browse the repository at this point in the history
We show the content item’s title inside the ‘large’ playerStyle which
the player was mistaking for a hoverable segment.
  • Loading branch information
tuzz committed Jul 22, 2024
1 parent 31bbf03 commit 9e955a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/helpers/chooseSegmentPerPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const shouldNotRespondToHoverOrClick = (node) => {

const isEditable = nodeName === "input" || nodeName === "textarea" || node.isContentEditable;
if (isEditable) { return true; }

const isPlayer = !!node.closest(".beyondwords-player");
if (isPlayer) { return true; }
};

const chooseSegmentBy = (matchFnFn, node, players, segmentPerPlayer, playersRemaining) => {
Expand Down

0 comments on commit 9e955a2

Please sign in to comment.