From c5998d70a3c53f337358d93f5893d063ec7991a0 Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Fri, 7 Dec 2018 17:16:01 +0800 Subject: [PATCH] prevent scroll when dispatch focus --- src/replay/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/replay/index.ts b/src/replay/index.ts index de2db2d3..26b6c892 100644 --- a/src/replay/index.ts +++ b/src/replay/index.ts @@ -380,7 +380,9 @@ export class Replayer { void this.mouse.offsetWidth; this.mouse.classList.add('active'); } else if (d.type === MouseInteractions.Focus) { - target.focus(); + target.focus({ + preventScroll: true, + }); } else { target.dispatchEvent(event); }