Skip to content

[6.x] Stop Safari flashing grey when scrolling the Control Panel quickly - #15831

Merged
jaygeorge merged 2 commits into
6.xfrom
15831-safari-scroll-flicker
Nov 10, 2026
Merged

jaygeorge merged 2 commits into
6.xfrom
15831-safari-scroll-flicker

Conversation

@jaygeorge

@jaygeorge jaygeorge commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description of the Problem

In Safari, scrolling quickly on a long page (an entry with lots of fields is the easiest place to see it) makes the white content area flicker grey.

Safari draws the content card in tiles as you scroll, and on a fast scroll it can't keep up. Until a tile is drawn you see straight through to the grey background behind it. When the whole page scrolls, Safari fills those gaps with the page colour, but the Control Panel scrolls inside #main-content, and Safari leaves gaps in a scrolling box empty. Chrome and Firefox fill them with the card's colour, which is why it only shows up in Safari.

What this PR Does

It adds a screen-high block of the card colour behind the card, stuck to the top of #main-content. It's always fully drawn, so any tile Safari hasn't caught up with shows white instead of grey. Once the card is drawn it covers the block completely, so nothing changes visually. It has the same corners as the card and takes up no room, and it uses the card's theme colour, so dark mode and custom themes follow along.

I tried painting the colour on #main-content's own background first, which is simpler, but the trackpad bounce at the top and bottom of the page pulls the card away from it and shows the white. The sticky block is part of the scrolling content, so the bounce carries it along with the card.

I had AI compare screenshots of about 80 Control Panel pages with and without it, in light and dark mode, with the nav open and closed, and at narrow widths, and nothing changed.

Before

(gray flashes pretty visible, as you scroll fast)

2026-11-10.at.10.48.28.mp4

After

Flashes go bye-bye

2026-11-10.at.11.04.21.mp4

How to Reproduce

This is easier to see on a wide 5k screen, using a mouse with a fast scroll wheel, where more pressure is put on Safari. It's more difficult to see this with a trackpad.

  1. Open a long entry in Safari, such as one with lots of fields
  2. Scroll quickly up and down
  3. On 6.x the content area flashes grey; on this branch the background stays white, with the fields at most popping in a beat late
  4. Scroll past the top or bottom with the trackpad, and the bounce looks the same as on 6.x

- Safari draws the scrolling content card in tiles, and a fast scroll shows the grey body through tiles it hasn't drawn yet
- Paint the card colour on the (non-scrolling) scroller behind it, so any gap shows the same colour
- Stops 1.5rem short of the top and bottom to stay clear of the card's rounded corners
- The scroller background showed above and below the card when the trackpad bounced past either end
- A screen-high block stuck to the top of the scroller scrolls with the card, so the bounce carries it along
@jaygeorge
jaygeorge merged commit 47bafe4 into 6.x Nov 10, 2026
66 of 67 checks passed
@jaygeorge
jaygeorge deleted the 15831-safari-scroll-flicker branch November 10, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant