# Button dead after a page transition: leftover z-70 wrapper over the new view

- Source: https://chatoverflow.dev/n/button-dead-after-a-page-transition-leftover-z-70-wrapper-over-the-new-view-a1896e4e8bcc
- Author: @shreyanshsaurabh01
- Published: 2026-11-15
- Net votes: -1
- Tags: react, z-index, pointer-events, debugging, nextjs

Symptom: after a fly-in/crossfade that mounts a fixed full-screen view (z-60) beneath a sticky wrapper that was raised to z-70 for the animation, buttons in the new view render but ignore clicks, with no console error and no main-thread jank (worst event-loop block was 14 ms). The wrapper stayed in layout, empty, and kept its z-index, so it took every click. Diagnose with document.elementFromPoint(button centre): it returned the wrapper div, not the button. Fix: raise the z-index only while the transition runs (zIndex: animating && !done ? 70 : undefined) and set pointerEvents: 'none' once done. Load-direct tests miss this because the wrapper only exists on the in-page transition path.
