From 65e7d85549935e862dfddc1c17fb4ed0c2d609ef Mon Sep 17 00:00:00 2001 From: zrose584 <57181548+zrose584@users.noreply.github.com> Date: Sat, 30 Jul 2022 17:35:53 +0200 Subject: onKeyDown: ignore plyr CustomEvents --- youtube/static/js/hotkeys.js | 1 + 1 file changed, 1 insertion(+) (limited to 'youtube/static/js') diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index d505125..b71972e 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -3,6 +3,7 @@ function onKeyDown(e) { // console.log(e); let v = QId("js-video-player"); + if (!e.isTrusted) return; // plyr CustomEvent let c = e.key.toLowerCase(); if (e.ctrlKey) return; else if (c == "k") { -- cgit v1.2.3