From 6ecdbb1a9c4b505faaeb30f60b0414f6aa6787e5 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Fri, 2 Oct 2020 15:27:09 +0300
Subject: [PATCH] fix comment resolve position

---
 editors/editoria/src/Editoria.js                                | 2 +-
 wax-prosemirror-components/package.json                         | 2 +-
 .../src/components/comments/ConnectedComment.js                 | 2 --
 wax-prosemirror-core/package.json                               | 2 +-
 wax-prosemirror-layouts/package.json                            | 2 +-
 wax-prosemirror-plugins/package.json                            | 2 +-
 wax-prosemirror-schema/package.json                             | 2 +-
 wax-prosemirror-services/package.json                           | 2 +-
 wax-prosemirror-themes/package.json                             | 2 +-
 wax-prosemirror-utilities/package.json                          | 2 +-
 10 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/editors/editoria/src/Editoria.js b/editors/editoria/src/Editoria.js
index 43ea1150a..e7b51cea4 100644
--- a/editors/editoria/src/Editoria.js
+++ b/editors/editoria/src/Editoria.js
@@ -47,7 +47,7 @@ const Editoria = () => (
       // value={`<p class="paragraph">This is the first paragraph</p><p class="paragraph">This is the second paragraph</p><p class="author">This is an author</p>`}
       layout={EditoriaLayout}
       // debug
-      onChange={source => console.log(source)}
+      // onChange={source => console.log(source)}
       user={user}
     />
   </Fragment>
diff --git a/wax-prosemirror-components/package.json b/wax-prosemirror-components/package.json
index 8c931f8a2..72f5ec582 100644
--- a/wax-prosemirror-components/package.json
+++ b/wax-prosemirror-components/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror UI components",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-components/src/components/comments/ConnectedComment.js b/wax-prosemirror-components/src/components/comments/ConnectedComment.js
index 3a3e4e534..e2becbda7 100644
--- a/wax-prosemirror-components/src/components/comments/ConnectedComment.js
+++ b/wax-prosemirror-components/src/components/comments/ConnectedComment.js
@@ -121,8 +121,6 @@ export default ({ comment, top, commentId, recalculateTops }) => {
       if (markPosition.to > maxPos) maxPos = markPosition.to;
     });
 
-    if (allCommentsWithSameId.length > 1)
-      maxPos += last(allCommentsWithSameId).node.nodeSize;
     dispatch(state.tr.removeMark(minPos, maxPos, commentMark));
     activeView.focus();
   };
diff --git a/wax-prosemirror-core/package.json b/wax-prosemirror-core/package.json
index cc4d3fd09..1bacd1596 100644
--- a/wax-prosemirror-core/package.json
+++ b/wax-prosemirror-core/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror core",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-layouts/package.json b/wax-prosemirror-layouts/package.json
index 35a33eae1..9c1b1a24a 100644
--- a/wax-prosemirror-layouts/package.json
+++ b/wax-prosemirror-layouts/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror layouts",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-plugins/package.json b/wax-prosemirror-plugins/package.json
index 08c98c732..1d72fd394 100644
--- a/wax-prosemirror-plugins/package.json
+++ b/wax-prosemirror-plugins/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror plugins",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-schema/package.json b/wax-prosemirror-schema/package.json
index 0fc629183..f8f677018 100644
--- a/wax-prosemirror-schema/package.json
+++ b/wax-prosemirror-schema/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror schema",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-services/package.json b/wax-prosemirror-services/package.json
index 762087d3e..0cea0c6ca 100644
--- a/wax-prosemirror-services/package.json
+++ b/wax-prosemirror-services/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror services",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-themes/package.json b/wax-prosemirror-themes/package.json
index 27385d552..8f478b755 100644
--- a/wax-prosemirror-themes/package.json
+++ b/wax-prosemirror-themes/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror themes",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
diff --git a/wax-prosemirror-utilities/package.json b/wax-prosemirror-utilities/package.json
index 1fb804540..cd413ff21 100644
--- a/wax-prosemirror-utilities/package.json
+++ b/wax-prosemirror-utilities/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.20",
   "description": "Wax prosemirror utilities",
   "license": "MIT",
-  "main": "dist/index.js",
+  "main": "index.js",
   "files": [
     "dist"
   ],
-- 
GitLab