Browse Source

refs 121002: initialize editor on cancel

Futa Arai 3 years ago
parent
commit
0547da33b0
1 changed files with 3 additions and 1 deletions
  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);
       setIsReadyToUse(false);
     }
     }
 
 
+    initializeEditor();
+
     if (onCancelButtonClicked != null) {
     if (onCancelButtonClicked != null) {
       onCancelButtonClicked();
       onCancelButtonClicked();
     }
     }
-  }, [isForNewComment, onCancelButtonClicked]);
+  }, [isForNewComment, onCancelButtonClicked, initializeEditor]);
 
 
   const postCommentHandler = useCallback(async() => {
   const postCommentHandler = useCallback(async() => {
     try {
     try {