diff --git a/app/javascript/mastodon/features/alt_text_modal/index.tsx b/app/javascript/mastodon/features/alt_text_modal/index.tsx index f285c3592..81706e956 100644 --- a/app/javascript/mastodon/features/alt_text_modal/index.tsx +++ b/app/javascript/mastodon/features/alt_text_modal/index.tsx @@ -330,7 +330,7 @@ export const AltTextModal = forwardRef>( }); }, [dispatch, setIsSaving, mediaId, onClose, position, description]); - const handleKeyUp = useCallback( + const handleKeyDown = useCallback( (e: React.KeyboardEvent) => { if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') { e.preventDefault(); @@ -457,7 +457,7 @@ export const AltTextModal = forwardRef>( id='description' value={isDetecting ? ' ' : description} onChange={handleDescriptionChange} - onKeyUp={handleKeyUp} + onKeyDown={handleKeyDown} lang={lang} placeholder={intl.formatMessage( type === 'audio'