diff --git a/app/soapbox/features/ui/components/modals/hotkeys-modal.tsx b/app/soapbox/features/ui/components/modals/hotkeys-modal.tsx index 48608047bb..11ec4bad34 100644 --- a/app/soapbox/features/ui/components/modals/hotkeys-modal.tsx +++ b/app/soapbox/features/ui/components/modals/hotkeys-modal.tsx @@ -102,7 +102,7 @@ const HotkeysModal: React.FC = ({ onClose }) => { n - + alt + n diff --git a/app/soapbox/features/ui/util/global-hotkeys.tsx b/app/soapbox/features/ui/util/global-hotkeys.tsx index 6d5bd6eccf..94204feb72 100644 --- a/app/soapbox/features/ui/util/global-hotkeys.tsx +++ b/app/soapbox/features/ui/util/global-hotkeys.tsx @@ -49,12 +49,13 @@ const GlobalHotkeys: React.FC = ({ children, node }) => { const handleHotkeyNew = (e?: KeyboardEvent) => { e?.preventDefault(); - if (!node.current) return; - const element = node.current.querySelector('textarea#compose-textarea') as HTMLTextAreaElement; + const element = node.current?.querySelector('textarea#compose-textarea') as HTMLTextAreaElement; if (element) { element.focus(); + } else { + dispatch(openModal('COMPOSE')); } }; diff --git a/app/soapbox/locales/en.json b/app/soapbox/locales/en.json index 619657cf9b..a197af3c9b 100644 --- a/app/soapbox/locales/en.json +++ b/app/soapbox/locales/en.json @@ -909,7 +909,7 @@ "keyboard_shortcuts.back": "to navigate back", "keyboard_shortcuts.blocked": "to open blocked users list", "keyboard_shortcuts.boost": "to repost", - "keyboard_shortcuts.compose": "to focus the compose textarea", + "keyboard_shortcuts.compose": "to open the compose textarea", "keyboard_shortcuts.down": "to move down in the list", "keyboard_shortcuts.enter": "to open post", "keyboard_shortcuts.favourite": "to like",