mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-28 01:39:29 +08:00
Fix isTrusted check on keyboard events
This commit is contained in:
parent
bf077e8a6e
commit
55bc27e415
1 changed files with 4 additions and 4 deletions
|
|
@ -4819,8 +4819,8 @@ $(document).on("click", "#commandLineMobileButton", () => {
|
|||
let dontInsertSpace = false;
|
||||
|
||||
$(document).keyup((event) => {
|
||||
if (!event.isTrusted) return;
|
||||
|
||||
if (!event.originalEvent.isTrusted) return;
|
||||
|
||||
if (resultVisible) return;
|
||||
let now = performance.now();
|
||||
let diff = Math.abs(keypressStats.duration.current - now);
|
||||
|
|
@ -4832,8 +4832,8 @@ $(document).keyup((event) => {
|
|||
});
|
||||
|
||||
$(document).keydown(function (event) {
|
||||
if (!event.isTrusted) return;
|
||||
|
||||
if (!event.originalEvent.isTrusted) return;
|
||||
|
||||
if (!resultVisible) {
|
||||
let now = performance.now();
|
||||
let diff = Math.abs(keypressStats.spacing.current - now);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue