From 0aed9de5c8d8f9995d549005df771389d779a393 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Thu, 24 Sep 2020 13:06:59 +0300 Subject: [PATCH] workaround for enter creating comment twice --- .../src/components/comments/ConnectedComment.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wax-prosemirror-components/src/components/comments/ConnectedComment.js b/wax-prosemirror-components/src/components/comments/ConnectedComment.js index a5144b1cf..c1aff2050 100644 --- a/wax-prosemirror-components/src/components/comments/ConnectedComment.js +++ b/wax-prosemirror-components/src/components/comments/ConnectedComment.js @@ -51,6 +51,9 @@ export default ({ comment, top, commentId, recalculateTops }) => { if (activeComment && commentId === activeComment.attrs.id) active = true; const onClickPost = content => { + // TODO find out why on enter comment posts twice. + if (last(comment.attrs.conversation).content === content) return; + const { tr } = state; const obj = { -- GitLab