about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/index.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-10-05 22:04:06 +0200
committerGitHub <noreply@github.com>2020-10-05 22:04:06 +0200
commit63770d3aac1611155213e4c903424849cc254519 (patch)
tree64b586523e2fe71e76f1f1b26d2016cf815d62ca /app/javascript/mastodon/features/ui/index.js
parent5a9ad221bf534cf52e2a81fda01b35088a3d8624 (diff)
Ignore alt-key hotkeys in text fields (#14942)
Fixes #14862

This used to be the case until #13987, which introduced a hotkey to toggle
the Content Warning field.

Unfortunately, MacOS relies on the “alt” key for many things, including
composing text (see #14862), therefore, even if that makes the CW toggle
hotkey significantly less useful, it makes sense to not interfere with
composing toots.
Diffstat (limited to 'app/javascript/mastodon/features/ui/index.js')
-rw-r--r--app/javascript/mastodon/features/ui/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
index b53e319d2..91c86b505 100644
--- a/app/javascript/mastodon/features/ui/index.js
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -379,7 +379,7 @@ class UI extends React.PureComponent {
 
   componentDidMount () {
     this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
-      return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName) && !e.altKey;
+      return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName);
     };
   }