Fix edit a reply in rich text editor (#9615)

Fix edit a reply in rich text editor
This commit is contained in:
Florian Duros 2022-11-28 16:01:49 +01:00 committed by GitHub
parent b302275289
commit 033c26ab53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 15 deletions

View file

@ -44,9 +44,9 @@ interface EditWysiwygComposerProps {
export function EditWysiwygComposer({ editorStateTransfer, className, ...props }: EditWysiwygComposerProps) {
const initialContent = useInitialContent(editorStateTransfer);
const isReady = !editorStateTransfer || Boolean(initialContent);
const isReady = !editorStateTransfer || initialContent !== undefined;
const { editMessage, endEditing, onChange, isSaveDisabled } = useEditing(initialContent, editorStateTransfer);
const { editMessage, endEditing, onChange, isSaveDisabled } = useEditing(editorStateTransfer, initialContent);
return isReady && <WysiwygComposer
className={classNames("mx_EditWysiwygComposer", className)}