Explorar o código

refs 121002: initialize editor on cancel

Futa Arai %!s(int64=3) %!d(string=hai) anos
pai
achega
0547da33b0
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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 {