Why Does the Button Move Just as Someone Tries to Click It?

A reader moves toward a button. An image loads above it, pushing the button down and placing another control under the pointer. The page may eventually look correct, but the transition created a misleading target.
Review the loading sequence as well as the final layout. Unexpected movement can be caused by content that arrives after the surrounding page has already been arranged.
Identify the arriving element
web.dev's layout-shift guidance identifies images and embeds without reserved dimensions, dynamically inserted content and fonts among common causes. It describes reserving space through dimensions or aspect-ratio handling.
The element that moves is not always the element causing the movement. Inspect what changed above or around it before editing the displaced button.
Record a reproducible sequence
Capture the page version, viewport and conditions that expose the shift. Test with a fresh cache and delayed resources where suitable tools allow it.
Include consent notices, announcements, remote widgets and content inserted after initial loading. A final screenshot cannot show the order in which these appeared.
Illustrative example: an article illustration
A fictional guide includes a wide illustration with no reserved space. The article text first fills the area, then moves down when the image arrives.
The implementer supplies dimensions matching the asset's actual ratio and verifies the responsive behavior. The reviewer checks both loading and the final crop. Reserving an arbitrary rectangle that distorts the image would create a different defect.
Handle variable content deliberately
Some embeds or notices have variable heights. Decide how their arrival should affect the page and whether they can occupy a predictable region.
Do not hide necessary content to protect a metric. If a message needs attention, integrate it in a way that preserves understandable navigation and avoids surprising movement near active controls.
Review font loading as well as images. Different text metrics can change wrapping and move nearby elements even when every image has dimensions.
Retest the user's action
Repeat the original attempt to reach the button while resources load. Check that the target remains understandable and that keyboard navigation is not disrupted.
Inspect multiple viewport sizes and realistic content lengths. A reserved area that works for one desktop crop may not fit a narrow-screen version.
Record the observed shift, likely cause, correction and follow-up result. Use performance measurements to complement the task observation, not to erase an obvious usability problem because a single score looks acceptable.
The aim is a stable interaction while the page becomes complete. That requires matching the space reservation to real content and testing the sequence that people actually experience.
Continue with Are Small Action Icons Causing the Wrong Record to Be Selected? for the related planning decision.
FutureOS is in prelaunch. Use this guide to prepare a concrete project discussion; the published introduction describes the current project context.
Prepared with AI assistance. Primary sources checked on October 23, 2026. Examples and procedures are illustrative editorial guidance, not FutureOS product announcements or an independently reviewed assessment.



Comments