This is one of the weirdest bugs I've ever encountered. Some chance it's an extension or a browser bug or something but it only shows up on the app I'm building when I'm refreshing it in development mode, so stackoverflow seems like the right place to start asking.
Basically under certain as-yet-unknown circumstances, every time I reload the page I'm working on, the <body>
element slides off the page to the left about 10px. And then when I refresh again it often slides even further. If I open the page in a new tab, it's fine.
In this screenshot below, I've highlighted the <body>
element in the element inspector.
Clues:
- it only happens sometimes, but once it happens almost every refresh increases the offset
- certain absolutely-positioned elements like the navbar continue to fill the whole width of the html element, but others don't
- the body element doesn't have any styles or classes it shouldn't have
- changing the body element position to absolute doesn't affect it
- the html element and the body element are still the same width
- I'm using a 4k screen on linux (?!)
My best guess is something like... it's double-loading some sort of AngularJS directive, although I neither know why it would do that nor why that would cause this bizarre problem. At any rate, likely I'll be the one to solve this, some months or years from now, but if you've got any ideas, I'm curious!