Skip to content

doc: hash navigation seems broken聽#39776

Description

@vsemozhetbyt

馃摋 API Reference Docs Problem

  • Version: 16.6.2
  • Platform: Windows 10 x64

Location

Many API sections

Description

If you open an API page and then go to some hash part of the same page in the same tab, it seems OK:

current.gif

If you open an API page and then click on some hash link to open it in a new tab, the page in the new tab shifts (scrolls) further after a while by a significant amount (delayed loading of some dynamic content may be the culprit):

new.gif

Tested with the last Google Chrome version (95.0.4608.0).

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    on Aug 15, 2021
  2. Trott commented on Aug 16, 2021

    @Trott
    Member

    Confirmed. That's strange. @nodejs/website

  3. lpinca commented on Aug 16, 2021

    @lpinca
    Member

    I can reproduce on Chrome 92 but not on Firefox 91. It work as expected there.

    Edit: Microsoft Edge 92 also works fine so I suspect it is a Chrome issue.

  4. Ayase-252 commented on Aug 16, 2021

    @Ayase-252
    Member

    Tested on Safari, it also works as expected. 馃

  5. vsemozhetbyt commented on Aug 16, 2021

    @vsemozhetbyt
    ContributorAuthor

    Posted as Chromium issue to be on the safe side: https://bugs.chromium.org/p/chromium/issues/detail?id=1240147

  6. KuthorX commented on Oct 11, 2023

    @KuthorX
    Contributor

    Chrome version 117.0.5938.92 on Windows10 can be reproduced.
    But I use ctrl+shift+R reload page, it will scroll to wrong position, and the probability of occurrence is 50%.
    The gif can be found at here

  7. valadaptive commented on Jun 28, 2024

    @valadaptive

    I can reproduce this problem on Firefox. Clicking on a link in the ToC will very often send me to a completely different part of the page:

    Peek.2024-06-28.19-50.mp4

    I don't believe this is a browser issue.

  8. valadaptive commented on Jun 29, 2024

    @valadaptive

    I posted this in #53584, but posting it here as well.

    This is not a Chromium bug, and occurs in Firefox as well. I believe it was not previously showing up in Firefox simply because they had not yet implemented the relevant CSS feature.

    This appears to be an effect of #37301. Lazy-loading the content means it is impossible for the browser to tell where to jump to, because it hasn't done the layout. And it hasn't done the layout because we explicitly told it not to. This is not a bug, this is the feature working as intended.

    Optimizing for the case of reading the entire API docs on a single huge page, at the expense of making it frustrating and difficult to navigate the individual documentation sections that show up way more often in web search results, seems like the wrong decision to me.

  9. avivkeller commented on Jun 29, 2024

    @avivkeller
    Member

    If you find the culprit, feel free to submit a patch :-)

  10. valadaptive commented on Jun 29, 2024

    @valadaptive

    The fix would be reverting #37301. Would that be acceptable?

  11. avivkeller commented on Jun 29, 2024

    @avivkeller
    Member

    You can try, whether or not it lands is a discussion for the PR, not this issue.

  12. valadaptive commented on Jun 29, 2024

    @valadaptive

    Ah, looks like it was already attempted in #41869. Apparently removing the hack causes some breakage, although no screenshots were provided. Currently trying to figure out how to build the documentation...

  13. valadaptive commented on Jun 29, 2024

    @valadaptive

    OK, just tracked it down and it was fixed in #53510 already which hasn't landed yet

  14. avivkeller commented on Jun 29, 2024

    @avivkeller
    Member

    OK, just tracked it down and it was fixed in #53510 already which hasn't landed yet

    That PR has landed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.docIssues and PRs related to Node.js documentation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions