Skip to content

Commit

Permalink
fix: Temporarily add logging around how long it takes to reset mouse …
Browse files Browse the repository at this point in the history
…position (#55)
  • Loading branch information
svanherk committed Jul 5, 2023
1 parent d5c6381 commit 022b76e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/browser/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export async function reset(opts) {

window.scroll(0, 0);

const startTime = Date.now();
await sendMouse({ type: 'move', position: [0, 0] }).catch(() => {});
const timeTaken = Date.now() - startTime;
// eslint-disable-next-line no-console
if (timeTaken > 200) console.log(`*** Took ${timeTaken}ms to reset mouse position.`);

if (document.activeElement !== document.body) {
document.activeElement.blur();
Expand Down

0 comments on commit 022b76e

Please sign in to comment.