Преглед изворни кода

refs 121002: initialize editor on cancel

Futa Arai пре 2 година
родитељ
комит
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 {