On iOS 6 if I'm at the bottom of a long page and press the button to open the sidebar, it's blank. I need to go to the top of the page to view the sidebar content. It should be set as position fixed I think.
Nope, nope, nope...
position: fixed is all I did in the beginning, and for several days, until I gave up on it.
It was (position-) absolute hell.
- Earlier versions of iOS don't support it correctly at all. Not that I care, but...
- Mobile devices only implement it half-heartedly, meaning that if you scroll the main screen, you can clearly see the sidebar struggling to keep up, probably because mobile devices implement position: fixed with some kind of JavaScript hack, or at least they refresh the position with a low priority, lower than the main screen's scroll thread, if you know what I mean...
- Scrolling within a fixed-position sidebar with overflow-hidden, while possible (and very much necessary, given that it also holds the main menu), is excruciatingly slow and unresponsive on my Galaxy S3... I can't even begin to imagine how slow it might be on older devices.
- When you reach the end of the sidebar, the browser will then bubble up the scrolling request to the main screen, meaning you find yourself with a static fixed sidebar and a scrolling screen, even though you're attempting to scroll the sidebar itself... It's really unintuitive, and I wrote some code to prevent that, which worked perfectly in desktop browsers, but failed on my S3. I couldn't get it to work, and I tried hard. I actually committed that piece of code to the attic, at the end of the "Unused-swipe.js" file, if anyone wants to look into it, but I'd hold my horses, if I were you...
So, yeah, for all these reasons, I started looking into using position: absolute, and it simply worked better for me... Yes, of course, you end up with empty space if you're at the end of a topic, but I can't help it. I could do something more convoluted, believe me I've thought about it, all I could think of is to reset the top position of the sidebar to whatever is your current scrollTop position, it's a cop-out, but it might work. It also means that if you accidentally close the sidebar and re-open it, its scroll position will be reset, but... Whatever. Is this something that most people would be interested in, or not..?
Or am I just trying too hard..? I mean, I guess everyone but me was happy with having the sidebar at the bottom, uh..? I just couldn't take the pressure of properly positioning the elements horizontally, sometimes it just looked so fucking ugly, I wanted an alternative, but I didn't expect it'd take me so long, and for that, I'm not grateful to my own quest for perfection...
:-/