# Elastic scrolling on ipad causes header to unstick from top of window

**URL:** https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481
**Category:** UX
**Tags:** tablet
**Created:** [2015 年 9 月 19 日午後 8:43 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481 "2015-09-19T20:43:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2015 年 9 月 19 日午後 8:43 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481/1 "2015-09-19T20:43:51Z")

</div>

Over-scrolling downwards on an ipad causes the header to unstick from the top of the window. If the drop-down menu is open the header will move underneath it.

 ![](https://global.discourse-cdn.com/meta/original/3X/4/1/41a2179724a896bd06003defc821a0945118c218.gif)

This is happening because during the over-scroll the .docked class is dropped from the body and the header’s position is changed from `fixed` to `absolute`. Setting `.d-header { position: fixed; }` keeps the header stuck to the top of the window. I’m not sure if doing that causes other problems though.

* * *

Edit - setting .d-header to alway have `position: fixed` interferes with having a custom header.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015 年 9 月 19 日午後 9:40 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481/2 "2015-09-19T21:40:43Z")

</div>

Reminder: “bug” as stated in the description for the category means prevents normal use of Discourse. This certainly does not…

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2015 年 9 月 20 日午前 5:12 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481/3 "2015-09-20T05:12:59Z")

</div>

It’s just a minor detail that makes the website feel like less than an app.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015 年 9 月 20 日午前 5:15 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481/4 "2015-09-20T05:15:32Z")

</div>

Not opposed to addressing the issue, just want to be clear on what a bug is, and where priorities should be.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2015 年 9 月 21 日午前 3:15 UTC](https://meta.discourse.org/t/elastic-scrolling-on-ipad-causes-header-to-unstick-from-top-of-window/33481/5 "2015-09-21T03:15:00Z")

</div>

This PR, or something similar, is a partial fix.  
[https://github.com/discourse/discourse/pull/3795](https://github.com/discourse/discourse/pull/3795)

I am fairly certain that for forums that are not using a custom header it is safe to set  
`.d-header{position: fixed;}` as both a desktop and a mobile customization. That will keep the header fixed to the top of the screen on ios devices.

For forums that do have a custom header, one possible workaround, combined with this PR, is to set the forum’s body background color to match the custom header’s background for small screens.

 ![](https://global.discourse-cdn.com/meta/original/3X/2/0/20bc203af39e554a89ca6f15dcf816b7dd144cd1.gif)
