demo ยท v144

DOM Update Replay

The classic bug: hover an element, swap it via React/Vue, and the new element doesn't think it's hovered. In Chrome 144 the engine fires pointerenter / mouseenter on the replacement once layout settles — matching Safari, Firefox, and the spec.

Note: keep the pointer hovering inside the blue box, then click swap. Without the fix, the new green box's :hover styles wouldn't activate until you moved.

hover me

the API

// No API change โ€” behaviour fix.
// After a DOM swap that puts a different element under the cursor:
//   - pointerleave fires on the removed element
//   - pointerenter fires on the new element
// before the next input event, matching CSS :hover state.

see also