Просмотр исходного кода

refs 121002: initialize editor on cancel

Futa Arai 2 лет назад
Родитель
Сommit
0547da33b0
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      apps/app/src/components/PageComment/CommentEditor.tsx

+ 3 - 1
apps/app/src/components/PageComment/CommentEditor.tsx

@@ -128,10 +128,12 @@ export const CommentEditor = (props: CommentEditorProps): JSX.Element => {
       setIsReadyToUse(false);
     }
 
+    initializeEditor();
+
     if (onCancelButtonClicked != null) {
       onCancelButtonClicked();
     }
-  }, [isForNewComment, onCancelButtonClicked]);
+  }, [isForNewComment, onCancelButtonClicked, initializeEditor]);
 
   const postCommentHandler = useCallback(async() => {
     try {