diff --git a/packages/core/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts b/packages/core/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts index 1011f58ca0..eb6b06dc7d 100644 --- a/packages/core/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +++ b/packages/core/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts @@ -135,10 +135,9 @@ function getDecorations( // Find the start of the first change to limit traversal scope. // We only need to check from the change point forward, since earlier // blocks are unaffected and their mapped decorations remain correct. - const range = tr.changedRange(); - if (!range) { - return { decorations: nextDecorationSet }; - } + // On init (no steps), changedRange() returns null — fall back to a + // full scan so initial content gets indexed. + const range = tr.changedRange() ?? { from: 0, to: tr.doc.nodeSize - 2 }; const decorationsToAdd = [] as Deco[]; // Track blockGroups where we've verified a decoration match past the diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png index 09bb9612c8..c8ee02e4c5 100644 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png and b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png index b9cb882b01..b8fed8d957 100644 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png and b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png index 22e9c484b7..998734ab19 100644 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png and b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png differ