# "docked" in \<body\> always present?

**URL:** https://meta.discourse.org/t/docked-in-body-always-present/216806
**Category:** Bug
**Created:** [February 2, 2022, 6:54am UTC](https://meta.discourse.org/t/docked-in-body-always-present/216806 "2022-02-02T06:54:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adundovi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adundovi/32/42645_2.png) [@adundovi](https://meta.discourse.org/u/adundovi)
#### Post date: [February 2, 2022, 6:54am UTC](https://meta.discourse.org/t/docked-in-body-always-present/216806/1 "2022-02-02T06:54:02Z")

</div>

It looks like something has changed recently in the way how Discourse handles the “docked” class in the `<body>` tag.

Before, if I remember correctly, “docked” appeared dynamically in `<body>` once the scrolling started ([example](https://meta.discourse.org/t/body-docked-class-not-removed-when-scrolling-back-to-the-top/146194/3)), but now, it is always present. Now, unfortunately, this class loses its purpose: you could simply drop it completely and remove [lines contain](https://github.com/discourse/discourse/search?q=not%28.docked%29&type=code) `not(.docked)`. But it would be helpful to keep the old behaviour for us who still use it to display, for example, a different header content at the very top compared to the reduced header when user starts scrolling.

Is there another way how to handle the described case now? Please, advise.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [February 2, 2022, 7:07am UTC](https://meta.discourse.org/t/docked-in-body-always-present/216806/2 "2022-02-02T07:07:33Z")

</div>

This could be helpful for you:

> [@Header scroll shadow](https://meta.discourse.org/t/header-scroll-shadow/198021/4):
>
> You can add something like to the header tab of your theme \<div class="header-anchor"\>\</div\> \<script type="text/discourse-plugin" version="0.8"\> if (!"IntersectionObserver" in window) return; const { on } = require("discourse-common/utils/decorators"); const stickyClass = "sticky"; api.modifyClass("component:site-header", { @on("didInsertElement") stickyHeaderCheck() { const anchor = document.querySelector(".header-anchor"); const header = this.element; new IntersectionObse…

> [@Logo in docked header bar](https://meta.discourse.org/t/logo-in-docked-header-bar/216199/2):
>
> Hello I think you can use for this @Johani 's fantastic solution. Something like this arrow_double_down Create a new component and add the following. Header section \<div class="header-anchor"\>\</div\> \<script type="text/discourse-plugin" version="0.8"\> if (!"IntersectionObserver" in window) return; const { on } = require("discourse-common/utils/decorators"); const stickyClass = "sticky"; api.modifyClass("component:site-header", { @on("didInsertElement") stickyHeaderCheck() { c…

> [@adundovi](#):
>
> Now, unfortunately, this class loses its purpose: you could simply drop it completely and remove [lines contain](https://github.com/discourse/discourse/search?q=not%28.docked%29&type=code) `not(.docked)`

This `.docked` you mentioned is different that is for the `.topic-progress-wrapper`.  
Which is appear when this ⏬

 ![Screenshot 2022-02-02 at 8.01.50](https://global.discourse-cdn.com/meta/original/3X/4/5/451d0a4cf1aa76cbac74d25d8343d28f50cd621c.png)

docked on the bottom of the topic.

---

<div class="post-metadata">

### Author: ![adundovi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adundovi/32/42645_2.png) [@adundovi](https://meta.discourse.org/u/adundovi)
#### Post date: [February 2, 2022, 9:57am UTC](https://meta.discourse.org/t/docked-in-body-always-present/216806/3 "2022-02-02T09:57:42Z")

</div>

Thanks. I’ll take a look into these two suggested topics.
