Fix isTrusted check on keyboard events

This commit is contained in:
SeerLite 2021-01-31 19:00:23 -03:00
parent bf077e8a6e
commit 55bc27e415

View file

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