mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-20 05:41:36 +00:00
refactor: Replace react-hotkeys with custom hook (#35425)
This commit is contained in:
@@ -93,9 +93,12 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
|
||||
if (e.key.toLowerCase() === 'enter' && (e.ctrlKey || e.metaKey)) {
|
||||
this.handleSubmit();
|
||||
}
|
||||
if (['esc', 'escape'].includes(e.key.toLowerCase())) {
|
||||
this.textareaRef.current?.blur();
|
||||
}
|
||||
};
|
||||
|
||||
getFulltextForCharacterCounting = () => {
|
||||
|
||||
Reference in New Issue
Block a user