]> cat aescling's git repositories - mastodon.git/commitdiff
Fully disable hotkeys when input element is focused (#5324)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 11 Oct 2017 14:31:07 +0000 (16:31 +0200)
committerGitHub <noreply@github.com>
Wed, 11 Oct 2017 14:31:07 +0000 (16:31 +0200)
Because alt+n is a way to enter some kinda letter on some keyboard

app/javascript/mastodon/features/ui/index.js

index 108b28422c72fe6c57056ad4a4534df6002babd2..70e451373dff214cb3bbb7699d7dcc3c2825b676 100644 (file)
@@ -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);
     };
   }