Menu

Autopsy #05: The z-index 9999 Modal Trap (and Its Native Exit)
πŸ“°

Autopsy #05: The z-index 9999 Modal Trap (and Its Native Exit)

DEV Community: frontendΒ·frontend.rocksΒ·about 1 hour ago
#msdH6vqC
#devtofrontend#devto#dev#anchor#index
Reading 0:00
15s threshold

Trapped Behind a Header With z-index: 2147483647

A minor UI polish PR added opacity: 0.99 and transform: translateZ(0) to the data-grid wrapper to smooth out horizontal scroll jitter. Storybook visual snapshots passed cleanly.

Two hours after release, customer support reported row-action menus clipped beneath the position: sticky; z-index: 10 page header. The menu itself had z-index: 9999 , yet it slid cleanly underneath a header with z-index: 10 .

T+00:00 : Grid wrapper GPU promotion ships to production.

T+22:00 : Users report row action menus ( z-index: 9999 ) rendering behind the z-index: 10 sticky header.

T+55:00 : Team ships a JS document.body portal with scroll listeners to escape clipping; Android p75 INP jumps from 140 ms to 480 ms.

T+90:00 : Performance traces show synchronous getBoundingClientRect() reflows on every scroll tick.

Why Higher z-index Numbers Lost the Arms Race

The first Slack reflex was to bump the menu's stylesheet from z-index: 9999 to z-index: 2147483647 and add…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.