@tiptap/core 2.0.0-beta.172 → 2.0.0-beta.173

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.
@@ -1197,8 +1197,8 @@ const setTextSelection = position => ({ tr, dispatch }) => {
1197
1197
  const { from, to } = typeof position === 'number'
1198
1198
  ? { from: position, to: position }
1199
1199
  : position;
1200
- const minPos = 0;
1201
- const maxPos = tr.doc.content.size;
1200
+ const minPos = prosemirrorState.TextSelection.atStart(doc).from;
1201
+ const maxPos = doc.content.size;
1202
1202
  const resolvedFrom = minMax(from, minPos, maxPos);
1203
1203
  const resolvedEnd = minMax(to, minPos, maxPos);
1204
1204
  const selection = prosemirrorState.TextSelection.create(doc, resolvedFrom, resolvedEnd);