MM-50746 : Edits to messages persist after cancelling (#22676)

Этот коммит содержится в:
GitStart
2023-04-14 09:57:22 +01:00
коммит произвёл GitHub
родитель 470e4c9d66
Коммит 4bf31bd227
2 изменённых файлов: 45 добавлений и 1 удалений

Просмотреть файл

@@ -220,7 +220,13 @@ const EditPost = ({editingPost, actions, canEditPost, config, channelId, draft,
actions.unsetEditingPost();
};
const handleAutomatedRefocusAndExit = () => handleRefocusAndExit(editingPost.refocusId || null);
const handleAutomatedRefocusAndExit = () => {
draftRef.current = {
...draftRef.current,
message: '',
};
handleRefocusAndExit(editingPost.refocusId || null);
};
const handleEdit = async () => {
if (!editingPost.post || isSaveDisabled()) {