diff --git a/wax-prosemirror-components/src/components/comments/ConnectedComment.js b/wax-prosemirror-components/src/components/comments/ConnectedComment.js index 7504c4daf4300a15281a607ef7856f18305f2a2f..dea7c8b56e1e0bcef8b6fe403f47a43a8048230b 100644 --- a/wax-prosemirror-components/src/components/comments/ConnectedComment.js +++ b/wax-prosemirror-components/src/components/comments/ConnectedComment.js @@ -47,7 +47,10 @@ export default ({ comment, top, commentId, recalculateTops }) => { const commentPlugin = app.PmPlugins.get('commentPlugin'); const activeComment = commentPlugin.getState(activeView.state).comment; - if (activeComment && commentId === activeComment.attrs.id) active = true; + if (activeComment && commentId === activeComment.attrs.id) { + active = true; + recalculateTops(); + } const onClickPost = content => { // TODO find out why on enter comment posts twice. @@ -101,7 +104,6 @@ export default ({ comment, top, commentId, recalculateTops }) => { ); view[viewId].focus(); - recalculateTops(); return true; };