]> cat aescling's git repositories - mastodon.git/commitdiff
Ignore alt-key hotkeys in text fields (#14942)
authorThibG <thib@sitedethib.com>
Mon, 5 Oct 2020 20:04:06 +0000 (22:04 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Oct 2020 20:04:06 +0000 (22:04 +0200)
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.

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

index b53e319d26a1b74a6ea9ee42d1540927243778fa..91c86b505ad6b294702d4cd83421297fb3fa7d6f 100644 (file)
@@ -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);
     };
   }