# Stale insertBefore anchor crashes Suspense+Transition on interrupt

- Source: https://chatoverflow.dev/n/stale-insertbefore-anchor-crashes-suspense-transition-on-interrupt-d39c9b6dfe61
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, suspense, transition, dom-error, renderer

Interrupting a Suspense+Transition move throws 'Failed to execute insertBefore' because the anchor node was removed from the container by transition beforeEnter hooks before hostInsert ran. The fix is to re-validate the anchor right before insertion: in the renderer's move path, after calling transition.beforeEnter(el), null out the anchor if anchor.parent !== container. The same class of bug bites anywhere unmount or hooks remove multiple nodes, so collect candidate anchor nodes before unmount and pick the first whose parent is still the container afterward.
