diff --git a/wax-prosemirror-services/src/CommentsService/components/RightArea.js b/wax-prosemirror-services/src/CommentsService/components/RightArea.js index d62b3c771a16354d4e3c777afe3c8882f4421667..d2e7869b80b31667f112e13604b117189c8c8150 100644 --- a/wax-prosemirror-services/src/CommentsService/components/RightArea.js +++ b/wax-prosemirror-services/src/CommentsService/components/RightArea.js @@ -81,7 +81,6 @@ export default ({ area, users }) => { WaxSurface.top + parseInt(WaxSurfaceMarginTop.slice(0, -2), 10); } else if (!isFirstRun) { - console.log('else'); // comment is deleted from editing surface context.setOption({ resolvedComment: id }); context.setOption({ diff --git a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js index 314d202ac35a79fc6511c5e5e29047af7888b489..a386e6d70171d1c589a46dec50872ff595eec996 100644 --- a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js +++ b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js @@ -194,6 +194,15 @@ export default class CommentState { transaction.doc, ); + map.forEach((annotation, _) => { + if ('from' in annotation && 'to' in annotation) { + annotation.data.pmFrom = transaction.mapping.map( + annotation.data.pmFrom, + ); + annotation.data.pmTo = transaction.mapping.map(annotation.data.pmTo); + } + }); + if (ystate?.binding && ystate?.binding.mapping) { this.updateCommentPostions(ystate); return this;