@portabletext/editor 1.44.10 → 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.
- package/lib/_chunks-cjs/editor-provider.cjs +1 -1
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-es/editor-provider.js +1 -1
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/package.json +1 -1
- package/src/editor/__tests__/PortableTextEditor.test.tsx +10 -0
- package/src/editor/__tests__/PortableTextEditorTester.tsx +3 -17
- package/src/editor/__tests__/RangeDecorations.test.tsx +6 -0
- package/src/editor/__tests__/pteWarningsSelfSolving.test.tsx +12 -5
- package/src/editor/__tests__/sync-value.test.tsx +5 -0
- package/src/editor/plugins/__tests__/withEditableAPIDelete.test.tsx +8 -3
- package/src/editor/plugins/__tests__/withEditableAPIGetFragment.test.tsx +3 -0
- package/src/editor/plugins/__tests__/withEditableAPIInsert.test.tsx +20 -12
- package/src/editor/plugins/__tests__/withEditableAPISelectionsOverlapping.test.tsx +5 -0
- package/src/editor/plugins/__tests__/withPortableTextLists.test.tsx +2 -0
- package/src/editor/plugins/__tests__/withPortableTextMarkModel.test.tsx +10 -289
- package/src/editor/plugins/__tests__/withPortableTextSelections.test.tsx +2 -0
- package/src/editor/plugins/__tests__/withUndoRedo.test.tsx +3 -0
- package/src/editor/sync-machine.ts +8 -6
- package/src/internal-utils/__tests__/valueNormalization.test.tsx +2 -0
|
@@ -2377,7 +2377,7 @@ function _updateBlock(slateEditor, currentBlock, oldBlock, currentBlockIndex) {
|
|
|
2377
2377
|
at: path
|
|
2378
2378
|
});
|
|
2379
2379
|
const isSpanNode = Text.isText(currentBlockChild) && currentBlockChild._type === "span" && Text.isText(oldBlockChild) && oldBlockChild._type === "span";
|
|
2380
|
-
isSpanNode && isTextChanged ? (Transforms.delete(slateEditor, {
|
|
2380
|
+
isSpanNode && isTextChanged ? (oldBlockChild.text.length > 0 && Transforms.delete(slateEditor, {
|
|
2381
2381
|
at: {
|
|
2382
2382
|
focus: {
|
|
2383
2383
|
path,
|