This commit is contained in:
Florian Duros 2022-10-13 16:46:47 +02:00
parent a96aea29a9
commit ac8397aa0f
No known key found for this signature in database
GPG key ID: 9700AA5870258A0B
6 changed files with 20 additions and 18 deletions

View file

@ -26,7 +26,7 @@ export const Editor = memo(
) {
return <div className="mx_WysiwygComposer_container">
<div className="mx_WysiwygComposer_content"
ref={ref}
ref={ref!}
contentEditable={!disabled}
role="textbox"
aria-multiline="true"

View file

@ -44,10 +44,10 @@ export function WysiwygComposer(
const { ref, isWysiwygReady, content, formattingStates, wysiwyg } = useWysiwyg();
useEffect(() => {
if (content !== null) {
if (!disabled && content !== null) {
onChange(content);
}
}, [onChange, content]);
}, [onChange, content, disabled]);
const memoizedSendMessage = useCallback(() => {
sendMessage(content, { mxClient, roomContext, ...props });