From a0f5efdcc765af4b69079f576cad3f14f1aa8b9c Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 16 May 2014 09:21:15 -0700 Subject: [PATCH] Attempt to resolve zixaphir/appchan-x#724 --- builds/4chan-X.user.js | 3 +++ builds/crx/script.js | 3 +++ src/Miscellaneous/Keybinds.coffee | 1 + 3 files changed, 7 insertions(+) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index e4fd91bab..6ea46e716 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -11994,6 +11994,9 @@ return; } target = e.target; + if (target.nodeName === 'embed') { + return; + } if ((_ref = target.nodeName) === 'INPUT' || _ref === 'TEXTAREA') { if (!/(Esc|Alt|Ctrl|Meta|Shift\+\w{2,})/.test(key)) { return; diff --git a/builds/crx/script.js b/builds/crx/script.js index 835c725e6..44facbb84 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12009,6 +12009,9 @@ return; } target = e.target; + if (target.nodeName === 'embed') { + return; + } if ((_ref = target.nodeName) === 'INPUT' || _ref === 'TEXTAREA') { if (!/(Esc|Alt|Ctrl|Meta|Shift\+\w{2,})/.test(key)) { return; diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 2522d6897..69b3fc00b 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -19,6 +19,7 @@ Keybinds = keydown: (e) -> return unless key = Keybinds.keyCode e {target} = e + return if target.nodeName is 'embed' # Prevent keybinds from firing on /f/ embeds. if target.nodeName in ['INPUT', 'TEXTAREA'] return unless /(Esc|Alt|Ctrl|Meta|Shift\+\w{2,})/.test key unless g.VIEW is 'catalog'