playwright.dev icon indicating copy to clipboard operation
playwright.dev copied to clipboard

[Bug]: Layout shifts if page contains images

Open cpAdm opened this issue 3 months ago • 1 comments

Issue

The documentation suffers from layout shifting. This is especially annoying when going to the documentation with a link that has an anchor. E.g. https://playwright.dev/docs/test-ui-mode#metadata. If you load this page for the first time (images are not cached yet), then you will not end up seeing the Metadata section at all.

Root cause

Due to the fact that images are loaded lazily, and their height/width are set to auto. There is no space reserved for these items.

cpAdm avatar Oct 13 '25 21:10 cpAdm