@portabletext/editor 1.44.9 → 1.44.11

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.
Files changed (26) hide show
  1. package/lib/_chunks-cjs/editor-provider.cjs +1 -1
  2. package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
  3. package/lib/_chunks-es/editor-provider.js +1 -1
  4. package/lib/_chunks-es/editor-provider.js.map +1 -1
  5. package/lib/index.cjs +20 -5
  6. package/lib/index.cjs.map +1 -1
  7. package/lib/index.js +20 -5
  8. package/lib/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/editor/Editable.tsx +3 -2
  11. package/src/editor/__tests__/PortableTextEditor.test.tsx +10 -0
  12. package/src/editor/__tests__/PortableTextEditorTester.tsx +3 -17
  13. package/src/editor/__tests__/RangeDecorations.test.tsx +6 -0
  14. package/src/editor/__tests__/pteWarningsSelfSolving.test.tsx +12 -5
  15. package/src/editor/__tests__/sync-value.test.tsx +5 -0
  16. package/src/editor/plugins/__tests__/withEditableAPIDelete.test.tsx +8 -3
  17. package/src/editor/plugins/__tests__/withEditableAPIGetFragment.test.tsx +3 -0
  18. package/src/editor/plugins/__tests__/withEditableAPIInsert.test.tsx +20 -12
  19. package/src/editor/plugins/__tests__/withEditableAPISelectionsOverlapping.test.tsx +5 -0
  20. package/src/editor/plugins/__tests__/withPortableTextLists.test.tsx +2 -0
  21. package/src/editor/plugins/__tests__/withPortableTextMarkModel.test.tsx +10 -289
  22. package/src/editor/plugins/__tests__/withPortableTextSelections.test.tsx +2 -0
  23. package/src/editor/plugins/__tests__/withUndoRedo.test.tsx +3 -0
  24. package/src/editor/range-decorations-machine.ts +21 -3
  25. package/src/editor/sync-machine.ts +8 -6
  26. package/src/internal-utils/__tests__/valueNormalization.test.tsx +2 -0
@@ -2351,7 +2351,7 @@ function _updateBlock(slateEditor, currentBlock, oldBlock, currentBlockIndex) {
2351
2351
  at: path
2352
2352
  });
2353
2353
  const isSpanNode = slate.Text.isText(currentBlockChild) && currentBlockChild._type === "span" && slate.Text.isText(oldBlockChild) && oldBlockChild._type === "span";
2354
- isSpanNode && isTextChanged ? (slate.Transforms.delete(slateEditor, {
2354
+ isSpanNode && isTextChanged ? (oldBlockChild.text.length > 0 && slate.Transforms.delete(slateEditor, {
2355
2355
  at: {
2356
2356
  focus: {
2357
2357
  path,