9
$\begingroup$

While compulsively checking my question, I noticed that a mysterious in-site scrollbar appeared. When I click on the scrollbar, the question disappears and I have to reload! This leads me to believe that the scrollbar is evil. I'm pretty sure this isn't intended behavior, just curious as to why this could happen.

enter image description here

Click on the scrollbar:

enter image description here

Using Chrome on Windows 8.1.

Notice the first screenshot is on Meta and the second is on the normal site. It doesn't seem to be happening on Meta anymore but still happens on the normal site.

Asaf suggested I click on the "Inspect element" menu option. While I program, I don't make websites, so I'm not sure how to interpret what I've displayed. I'll post it here.

enter image description here

UPDATE: Now when I reload the evil scrollbar appears, then disappears, so reproducing the bug is probably going to be hard now.

$\endgroup$
  • $\begingroup$ Just like Electric Light Orchestra once said "Eeeevil scrollbar (tanananana) eeeevilll scrollbar (tananana ta!) Eeeevil scroooollbaaarrrr..."; but also, can you get a screenshot? $\endgroup$ – Asaf Karagila Aug 2 '15 at 13:52
  • 3
    $\begingroup$ +1 for deducing that the scrollbar is evil. $\endgroup$ – Daniel Soltész Aug 2 '15 at 15:42
  • $\begingroup$ That's odd. Did you try to "inspect element" and see if there's any foul play in the computation of the CSS rules? $\endgroup$ – Asaf Karagila Aug 2 '15 at 15:48
  • $\begingroup$ @AsafKaragila I added the inspect element display. $\endgroup$ – Matt Samuel Aug 2 '15 at 16:17
  • 1
    $\begingroup$ Do you happen to be zoomed in/out? Ctrl + 0 will reset zoom to 100%. $\endgroup$ – Oded Aug 3 '15 at 11:42
  • $\begingroup$ @Oded I zoom because the screen is tiny and I see poorly. $\endgroup$ – Matt Samuel Aug 3 '15 at 12:16
  • $\begingroup$ @MattSamuel - I appreciate that - this is most likely the reason you see a scrollbar, however. The sites are not designed to be used with zoom, so scrollbars and other display issues can show up when zooming. $\endgroup$ – Oded Aug 3 '15 at 12:34
  • $\begingroup$ @Oded guess I'll just not click on it then! $\endgroup$ – Matt Samuel Aug 3 '15 at 12:37
  • 1
    $\begingroup$ So it turns out the scrollbar is a necessary evil, eh? :-) $\endgroup$ – Asaf Karagila Aug 3 '15 at 18:02
  • $\begingroup$ Seems so. ${}{}{}{}{}{}{}{}$ $\endgroup$ – Matt Samuel Aug 3 '15 at 18:03
  • 3
    $\begingroup$ @Oded: "not designed to be used with zoom" is somewhat humorous - of course zoom is one of the expected issues that a professionally designed site should be designed to handle! $\endgroup$ – Carl Mummert Aug 10 '15 at 22:08
  • $\begingroup$ You have a lot of tabs. $\endgroup$ – zixuan Feb 1 at 22:46
5
$\begingroup$

Using Chrome, the mysterious scroll bar appears for me when I zoom in, but only at 110% and 125%, not at 150% or 175%.

Interestingly, the same thing does not happen on math.stackexchange.com or tex.stackexchange.com.

$\endgroup$
  • $\begingroup$ The site I use the most is MSE and I've had no problems with their interface. $\endgroup$ – Matt Samuel Aug 10 '15 at 22:16
  • $\begingroup$ @Matt, Carl: Different sites have [slightly] different CSS templates (e.g. fonts, height of certain objects, etc.) which may cause this sort of discrepancy. $\endgroup$ – Asaf Karagila Aug 18 '15 at 22:29
4
$\begingroup$

I'm pretty sure it's the same Chrome bug as reported here for comments when using SOUP. Basically, Chrome seems to sometimes have trouble calculating the correct content dimensions for elements with overflow: auto, and occasionally ends up underestimating the required size by a pixel or two, causing a useless (and somewhat broken) scroll bar to appear where no scroll bar should be.

In this particular case, I suspect that simply styling the #content div with overflow: hidden instead of overflow: auto should be enough to get rid of the scroll bar. It might sometimes cause the bottom of the page to be clipped by one or two pixels on Chrome instead, but that should be completely harmless.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .