docs/plans/2026-05-11-scroll-into-view-repeat-regression.md
Route: http://localhost:3100/examples/scroll-into-view
Steps:
Expected: the editor autoscrolls again.
Actual: the second typed update does not autoscroll.
.tmp/slate-v2/packages/slate-react/src/components/editable.tsx.defaultScrollSelectionIntoView temporarily assigns
leafEl.getBoundingClientRect so scroll-into-view-if-needed measures the
focus point.leafEl.getBoundingClientRect = undefined, which
shadows the prototype method on the same DOM node. A later scroll attempt
sees typeof leafEl.getBoundingClientRect !== 'function' and returns early.docs/solutions/logic-errors/2026-04-20-editable-blocks-app-owned-surfaces-must-not-churn-runtime-ids-or-miss-plain-editor-updates.md
says selection-to-DOM scroll forwarding needs focused contracts.defaultScrollSelectionIntoView now restores the original leaf measurement
behavior after temporary focus-point measurement.slate-react patch changeset.bun test ./packages/slate-react/test/editable-behavior.tsx -t "default scroll restores leaf measurement" passed after fix.bunx biome check packages/slate-react/src/components/editable.tsx packages/slate-react/test/editable-behavior.tsx --fix passed.bun test ./packages/slate-react/test/editable-behavior.tsx passed.bun test ./packages/slate-react/test/rendering-strategy-and-scroll.tsx ./packages/slate-react/test/editable-behavior.tsx passed:
37 tests, 153 expects.bun --filter slate-react typecheck passed.pnpm lint:fix in plate-2 passed.bun run completion-check in plate-2 passed with no session state.http://localhost:3100/examples/scroll-into-view to load
the reported surface and exercise the scrollable editor. Browser coordinate
control was not reliable enough to place the caret at the lower text endpoint;
the exact repeated-scroll failure is covered by the focused DOM-range
regression test.