Skip to content

Commit

Permalink
fix: replayClick script (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauravbv authored Sep 6, 2024
1 parent ed66848 commit e0e6723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/template/replay.mjs
Original file line number Diff line number Diff line change
@@ -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)}})})();
(()=>{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)}})})();
2 changes: 1 addition & 1 deletion src/template/replay.mjs
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit e0e6723

Please sign in to comment.