@tiptap/core 2.23.1 → 2.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/cut.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1639,7 +1639,7 @@ const cut = (originRange, targetPos) => ({ editor, tr }) => {
|
|
|
1639
1639
|
tr.deleteRange(originRange.from, originRange.to);
|
|
1640
1640
|
const newPos = tr.mapping.map(targetPos);
|
|
1641
1641
|
tr.insert(newPos, contentSlice.content);
|
|
1642
|
-
tr.setSelection(new state.TextSelection(tr.doc.resolve(newPos - 1)));
|
|
1642
|
+
tr.setSelection(new state.TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0))));
|
|
1643
1643
|
return true;
|
|
1644
1644
|
};
|
|
1645
1645
|
|