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$
12
  • $\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 Mod
    Commented Aug 2, 2015 at 13:52
  • 3
    $\begingroup$ +1 for deducing that the scrollbar is evil. $\endgroup$ Commented Aug 2, 2015 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 Mod
    Commented Aug 2, 2015 at 15:48
  • $\begingroup$ @AsafKaragila I added the inspect element display. $\endgroup$ Commented Aug 2, 2015 at 16:17
  • 1
    $\begingroup$ Do you happen to be zoomed in/out? Ctrl + 0 will reset zoom to 100%. $\endgroup$
    – Oded Staff
    Commented Aug 3, 2015 at 11:42
  • $\begingroup$ @Oded I zoom because the screen is tiny and I see poorly. $\endgroup$ Commented Aug 3, 2015 at 12:16
  • 1
    $\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 Staff
    Commented Aug 3, 2015 at 12:34
  • $\begingroup$ @Oded guess I'll just not click on it then! $\endgroup$ Commented Aug 3, 2015 at 12:37
  • 2
    $\begingroup$ So it turns out the scrollbar is a necessary evil, eh? :-) $\endgroup$
    – Asaf Karagila Mod
    Commented Aug 3, 2015 at 18:02
  • $\begingroup$ Seems so. ${}{}{}{}{}{}{}{}$ $\endgroup$ Commented Aug 3, 2015 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$ Commented Aug 10, 2015 at 22:08
  • 1
    $\begingroup$ You have a lot of tabs. $\endgroup$ Commented Feb 1, 2019 at 22:46

2 Answers 2

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$
2
  • $\begingroup$ The site I use the most is MSE and I've had no problems with their interface. $\endgroup$ Commented Aug 10, 2015 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 Mod
    Commented Aug 18, 2015 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 .