From 6e729f42c325fc49c2bdcac8d52ca718a1d6c771 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 11 Oct 2017 16:31:07 +0200 Subject: [PATCH] Fully disable hotkeys when input element is focused (#5324) Because alt+n is a way to enter some kinda letter on some keyboard --- app/javascript/mastodon/features/ui/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index 108b28422c..70e451373d 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -186,7 +186,7 @@ export default class UI extends React.Component { componentDidMount () { this.hotkeys.__mousetrap__.stopCallback = (e, element) => { - return !(e.altKey || e.ctrlKey || e.metaKey) && ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName); + return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName); }; }