Skip to content
Snippets Groups Projects
Commit 5f353101 authored by chris's avatar chris
Browse files

recalculate tops when active changes

parent 64e0e314
No related branches found
No related tags found
1 merge request!166Fixes
...@@ -47,7 +47,10 @@ export default ({ comment, top, commentId, recalculateTops }) => { ...@@ -47,7 +47,10 @@ export default ({ comment, top, commentId, recalculateTops }) => {
const commentPlugin = app.PmPlugins.get('commentPlugin'); const commentPlugin = app.PmPlugins.get('commentPlugin');
const activeComment = commentPlugin.getState(activeView.state).comment; 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 => { const onClickPost = content => {
// TODO find out why on enter comment posts twice. // TODO find out why on enter comment posts twice.
...@@ -101,7 +104,6 @@ export default ({ comment, top, commentId, recalculateTops }) => { ...@@ -101,7 +104,6 @@ export default ({ comment, top, commentId, recalculateTops }) => {
); );
view[viewId].focus(); view[viewId].focus();
recalculateTops();
return true; return true;
}; };
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment