Fix test
This commit is contained in:
parent
a96aea29a9
commit
ac8397aa0f
6 changed files with 20 additions and 18 deletions
|
@ -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"
|
||||
|
|
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue