<body> docked class not removed when scrolling back to the top?

If I remember correctly the docked class is meant for additional content added to the header (in the Header section of a theme). You can add a line of text to Header to see the class show/hide as expected.

So unless you have custom header content, the header is docked at scroll and stays that way permanently.

At one point ages ago (think 4+ years) we undocked the header at the top of the page… but that regressed, went unnoticed for a long time, and then we decided to adopt the regression.

We can likely improve it, the current behavior causes a little initial “pop” as you scroll for the first time (hard refresh to see it)… but we do have to be very careful to not break all the existing header cusotmizations out there (there are lots of them!). It might make sense to wait a little bit longer (until we drop IE11) and then look at making more significant improvements along with it, like using position: sticky; instead of fixed.

9 Likes