Merge remote-tracking branch 'soapbox/develop' into lexical
This commit is contained in:
commit
6a172f525f
3 changed files with 5 additions and 4 deletions
|
@ -102,7 +102,7 @@ const HotkeysModal: React.FC<IHotkeysModal> = ({ onClose }) => {
|
|||
</tr>
|
||||
<tr>
|
||||
<TableCell><Hotkey>n</Hotkey></TableCell>
|
||||
<TableCell><FormattedMessage id='keyboard_shortcuts.compose' defaultMessage='to focus the compose textarea' /></TableCell>
|
||||
<TableCell><FormattedMessage id='keyboard_shortcuts.compose' defaultMessage='to open the compose textarea' /></TableCell>
|
||||
</tr>
|
||||
<tr>
|
||||
<TableCell><Hotkey>alt</Hotkey> + <Hotkey>n</Hotkey></TableCell>
|
||||
|
|
|
@ -49,12 +49,13 @@ const GlobalHotkeys: React.FC<IGlobalHotkeys> = ({ 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'));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue