docs.pushbullet.com - layout is messed up
URL: https://docs.pushbullet.com/ Browser / Version: Firefox 52.0 Operating System: Mac OS X 10.11 Problem type: Layout is messed up
Steps to Reproduce
- Navigate to: https://docs.pushbullet.com/
- Scroll right
Expected Behavior: Text doesn't move behind navigation
Actual Behavior: Text moves behind navigation
Reproduces in Firefox 49 as well, works as expected in Safari / Chrome

From webcompat.com with ❤️
I can reproduce the same issue on Firefox android. There is a different issue on Ubuntu Firefox 41.0,the content on the far left does not appear at all.
I can't reproduce the issue on Firefox Nightly.
Thanks @techchic. Just to add, I can reproduce in IE 11 as well but not Edge.
The navbar is at the end of the document.
<div id="navbar"
style="height:100%;
left:0px;
outline:none;
overflow-y:scroll;
padding:20px;
position:fixed;
top:0px;
width:250px;"
tabindex="1">
</div>
It's a position: fixed going out of the flow and then the body is set-up in a way that it has a padding left.
<body style="width: 900px; margin: 0px 0px 0px 250px; padding: 0px 50px 0 50px;">
</body>
The design is working on large screen, wider than 900px + 250px + 50px, around 1630px
The difference in between WebKit/Blink and Gecko is that scrolling on the side keeps the boxes position together.
Another interesting difference is when we put the cursor on the menu navbar. On WebKit/Blink, there is no scroll, on Gecko it is scrolling.
They're actually using JS to push the navbar left as the user scrolls:
window.addEventListener("scroll", function(e) {
navbar.style.left = -document.body.scrollLeft + "px"
})
But there is no real standard for which element's scrollLeft should be changed, and Chrome changes it on the <body> element while Firefox changes it on the <html> element.
It's a trivial fix for PushBullet, and they really should fix it because a standard for this behavior is unlikely to come along anytime soon. They just have to change the above function to something like this:
window.addEventListener("scroll", function(e) {
var scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft || 0;
navbar.style.left = -scrollLeft + "px"
})
But they really should be reconsidering how they lay the page out entirely, because using JS to do scroll-related effects like this is pretty inefficient, especially on mobile devices.
Thanks for the analysis @wisniewskit.
Maybe @christopherhesse or @guzba from @Pushbullet can take a look?
I wrote that page. It is not for use on mobile, only desktop. I think maybe that code used to be there for a reason, but it looks like right now it should just use frames instead of javascript for that. If that's too much of a pain, I will probably use wisniewskit's suggestion. Thanks!
Actually I don't see any way to have frames without multiple html files? I guess I will just use that javascript fix.
@christopherhesse: just be aware that you probably use document.body.scrollLeft in more places than that one, so you may want to make the same fix on multiple lines (or make a simple function for returning the scroll position if you're so inclined).
I used that scrollLeft code. Ideally I think it would work like http://jsfiddle.net/qndjW/95/ but I spent 3 minutes trying to get that to work and it didn't work, so maybe some day.
I agree that something like the jsfiddle would be better in the long run, but at least we have a fix for the site as-is for now. Thanks, it's appreciated!