Skip to content

Commit

Permalink
fix(hint): pass the correct targetElement to align position
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinm committed Mar 23, 2023
1 parent 8949fad commit d1dccdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/hint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,11 @@ export async function addHints() {
hint.appendChild(hintPulse);
hint.setAttribute("data-step", i.toString());

const targetElement = item.element;
item.element = hint;

// align the hint position
alignHintPosition.call(this, item.hintPosition, hint, item.element);
alignHintPosition.call(this, item.hintPosition, hint, targetElement);

hintsWrapper.appendChild(hint);
});
Expand Down

0 comments on commit d1dccdf

Please sign in to comment.