Skip to content

Commit bd9b4ca

Browse files
author
Romaric Mourgues
authored
🛠 Fix focus on quoted messages
1 parent efe62df commit bd9b4ca

File tree

1 file changed

+9
-1
lines changed
  • twake/frontend/src/app/views/applications/messages/input

1 file changed

+9
-1
lines changed

twake/frontend/src/app/views/applications/messages/input/input.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ export default (props: Props) => {
8787
id: props.threadId,
8888
});
8989

90-
const { isActive: isBeingQuoted, close } = useMessageQuoteReply(props.channelId || '');
90+
const {
91+
isActive: isBeingQuoted,
92+
close,
93+
message: messageBeingQuoted,
94+
} = useMessageQuoteReply(props.channelId || '');
9195

9296
const { upload, clear: clearUploads } = useUploadZones(editorId);
9397
const format = props.format || 'markdown';
@@ -349,6 +353,10 @@ export default (props: Props) => {
349353
}
350354
};
351355

356+
useEffect(() => {
357+
focusEditor();
358+
}, [messageBeingQuoted]);
359+
352360
const disabled = isEmpty() || isTooLong;
353361
return (
354362
<div className={'message-input w-full'} ref={props.ref} onClick={() => focus()}>

0 commit comments

Comments
 (0)