Merge pull request #909 from SeerLite/istrusted

Fix isTrusted check on keyboard events
This commit is contained in:
Jack 2021-01-31 23:59:07 +00:00 committed by GitHub
commit 43bc3d5bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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