From d1dccdf8f4a36e991551a3649c9821d5346d0a08 Mon Sep 17 00:00:00 2001 From: Afshin Mehrabani Date: Thu, 23 Mar 2023 09:12:40 +0000 Subject: [PATCH] fix(hint): pass the correct targetElement to align position --- src/core/hint.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hint.ts b/src/core/hint.ts index dbd6924d2..6c18718d3 100644 --- a/src/core/hint.ts +++ b/src/core/hint.ts @@ -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); });