prevent scroll when dispatch focus

This commit is contained in:
Yanzhen Yu
2018-12-07 17:16:01 +08:00
parent fda6d1c873
commit c5998d70a3

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