diff --git a/app/javascript/mastodon/features/alt_text_modal/index.tsx b/app/javascript/mastodon/features/alt_text_modal/index.tsx index a6b621e6d9..3c54fa4724 100644 --- a/app/javascript/mastodon/features/alt_text_modal/index.tsx +++ b/app/javascript/mastodon/features/alt_text_modal/index.tsx @@ -329,7 +329,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(); @@ -456,7 +456,7 @@ export const AltTextModal = forwardRef>( id='description' value={isDetecting ? ' ' : description} onChange={handleDescriptionChange} - onKeyUp={handleKeyUp} + onKeyDown={handleKeyDown} lang={lang} placeholder={intl.formatMessage( type === 'audio'