File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/components/ReactFileUtilities Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export const UploadFileInput = forwardRef(function UploadFileInput(
5050 ref : React . ForwardedRef < HTMLInputElement > ,
5151) {
5252 const { t } = useTranslationContext ( 'UploadFileInput' ) ;
53- const { cooldownRemaining } = useMessageInputContext ( ) ;
53+ const { cooldownRemaining, textareaRef } = useMessageInputContext ( ) ;
5454 const messageComposer = useMessageComposer ( ) ;
5555 const { attachmentManager } = messageComposer ;
5656 const { isUploadEnabled } = useAttachmentManagerState ( ) ;
@@ -63,9 +63,10 @@ export const UploadFileInput = forwardRef(function UploadFileInput(
6363 const onFileChange = useCallback (
6464 ( files : Array < File > ) => {
6565 attachmentManager . uploadFiles ( files ) ;
66+ textareaRef . current ?. focus ( ) ;
6667 onFileChangeCustom ?.( files ) ;
6768 } ,
68- [ onFileChangeCustom , attachmentManager ] ,
69+ [ onFileChangeCustom , attachmentManager , textareaRef ] ,
6970 ) ;
7071
7172 return (
You can’t perform that action at this time.
0 commit comments