Repository navigation
[6.x] Stop Safari flashing grey when scrolling the Control Panel quickly - #15831
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
6.xthe content area flashes grey; on this branch the background stays white, with the fields at most popping in a beat late6.x