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

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.
@@ -1193,8 +1193,8 @@ const setTextSelection = position => ({ tr, dispatch }) => {
1193
1193
  const { from, to } = typeof position === 'number'
1194
1194
  ? { from: position, to: position }
1195
1195
  : position;
1196
- const minPos = Selection.atStart(doc).from;
1197
- const maxPos = Selection.atEnd(doc).to;
1196
+ const minPos = 0;
1197
+ const maxPos = tr.doc.content.size;
1198
1198
  const resolvedFrom = minMax(from, minPos, maxPos);
1199
1199
  const resolvedEnd = minMax(to, minPos, maxPos);
1200
1200
  const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd);
@@ -2168,8 +2168,12 @@ const Tabindex = Extension.create({
2168
2168
  new Plugin({
2169
2169
  key: new PluginKey('tabindex'),
2170
2170
  props: {
2171
- attributes: {
2172
- tabindex: '0',
2171
+ attributes: () => {
2172
+ if (this.editor.isEditable) {
2173
+ return {
2174
+ tabindex: '0',
2175
+ };
2176
+ }
2173
2177
  },
2174
2178
  },
2175
2179
  }),