diff --git a/4chan_x.user.js b/4chan_x.user.js index 7d11b7e82..8db8c3914 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -746,7 +746,7 @@ cb: { keydown: function(e) { var key, o, qr, range, selEnd, selStart, ta, thread, valEnd, valMid, valStart, value, _ref, _ref2, _ref3; - if (((_ref = d.activeElement.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !e.keyCode === 27) { + if (((_ref = d.activeElement.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) { return; } key = keybinds.cb.keyCode(e); diff --git a/script.coffee b/script.coffee index 8fd526fa9..279c49576 100644 --- a/script.coffee +++ b/script.coffee @@ -539,7 +539,7 @@ keybinds = cb: keydown: (e) -> - return if d.activeElement.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not e.keyCode is 27 + return if d.activeElement.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27) key = keybinds.cb.keyCode e if e.altKey then key = 'alt+' + key if e.ctrlKey then key = 'ctrl+' + key