10

When you click a link to a specific answer, it appears the scroll position is set a couple lines too far down. This has been going on for a while (weeks?), but I'm pretty sure it hasn't always been a problem.

I'm not a web-UI person, but I believe the problem is the top bar overlaps the top of the page rather than being a separate entity that lives north of the scrollable region. Thus, the browser does scroll to position the <a name="number"></a> element at the top of the browser window, but the first couple line of text are covered by the top bar.

For example, when I click on this link, I see:

top two lines of direct-to-answer link are covered by the top navigation bar

Note that the top two lines of the answer are not in view.

Arguably, this is just a slight annoyance. But for folks finding their way to Stack Overflow for the first time from a search engine result, it would make a better impression to get the scroll position just right.

In case it matters ...

Chrome 116.0.5845.141 (Official Build) (64-bit) (cohort: Stable), Windows 10 Version 22H2 (Build 19045.3324)

6
  • 1
    See also this old bug (fixed)
    – Laurel
    Commented Sep 4, 2023 at 21:04
  • 2
    I see that it does scroll a little more but then given a fraction of a second more it scrolls back to correct position. What I've noticed it doesn't cope well with is the user beginning to scroll just as it finishes up. It also doesn't work well with what I assume is comments being loaded up which causes it to miss the mark by quite a lot Commented Sep 5, 2023 at 4:09
  • No repro for me. Also Chrome on Win 10, two different machines.
    – Gimby
    Commented Sep 5, 2023 at 7:59
  • "Easy Workaround" = No Repro when using the 'uBlock' Script I had posted here. // Repro if I disable the Script, especially the part about setting back the 'Top Bar' to "unsticky".. // [FCI: FF v116.0.3_x64 + Win10_Pro_x64_22H2, + Logged in to 'SO'.]
    – chivracq
    Commented Sep 5, 2023 at 8:58
  • Interesting, I can repro only by going to the address bar then hitting enter again. Initial navigation works fine for me, I only end up in the wrong place if I navigate after the page has already loaded fully
    – Erik A
    Commented Sep 5, 2023 at 12:38
  • I tried again in Incognito mode, just to ensure it wasn't some extension, and it made no difference. However, I did discover that the problem occurs only when I'm signed in. Commented Sep 5, 2023 at 23:05

0

You must log in to answer this question.

Browse other questions tagged .