prevent scroll when dispatch focus

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent b2806d6f81
commit 5f28a8d534

View File

@@ -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);
}