From c49201273752bac6a24754cb9a387f96e73e3775 Mon Sep 17 00:00:00 2001 From: Saurav B V <41701284+sauravbv@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:41:13 +0530 Subject: [PATCH] fix: replayClick script --- src/runtime/template/replay.mjs | 2 +- src/template/replay.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/template/replay.mjs b/src/runtime/template/replay.mjs index 8d7f67d..c25cbe2 100644 --- a/src/runtime/template/replay.mjs +++ b/src/runtime/template/replay.mjs @@ -1 +1 @@ -(()=>{w._$delayHydration.then(e=>{if(e instanceof PointerEvent||e instanceof MouseEvent&&e.type!=="click"||window.TouchEvent&&e instanceof TouchEvent){setTimeout(()=>w.requestIdleCallback(()=>setTimeout(()=>e.target&&e.target.click(),500)),50)}})})(); \ No newline at end of file +(()=>{w._$delayHydration.then(e=>{if(e instanceof PointerEvent||e instanceof MouseEvent&&e.type==="click"||window.TouchEvent&&e instanceof TouchEvent){setTimeout(()=>w.requestIdleCallback(()=>setTimeout(()=>e.target&&e.target.click(),500)),50)}})})(); \ No newline at end of file diff --git a/src/template/replay.mjs b/src/template/replay.mjs index 3d8a853..1f26505 100644 --- a/src/template/replay.mjs +++ b/src/template/replay.mjs @@ -1,7 +1,7 @@ /* eslint-disable */ (() => { w._$delayHydration.then((e) => { - if (e instanceof PointerEvent || (e instanceof MouseEvent && e.type !== 'click') || (window.TouchEvent && e instanceof TouchEvent)) { + if (e instanceof PointerEvent || (e instanceof MouseEvent && e.type === 'click') || (window.TouchEvent && e instanceof TouchEvent)) { setTimeout(() => { return w.requestIdleCallback(() => setTimeout(() => e.target && e.target.click(), 500)); }, 50);