GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [documentation site] Back button does not scroll the page (solution included) · Issue #6751 · nodejs/node

[documentation site] Back button does not scroll the page (solution included) #6751

New issue
Copy link
New issue
Copy link
Closed
Closed
[documentation site] Back button does not scroll the page (solution included)#6751
Copy link
Labels
docIssues and PRs related to Node.js documentation.

Description

@ibc
ibc
opened on May 13, 2016
Issue body actions

NOTE: This happens in a computer view (big screen).

How to reproduce (at least in Chrome):

  • Open (for example) https://nodejs.org/api/http.html
  • Within the "Table of Content", click in Class: http.ClientRequest.
  • It will scroll down to the corresponding class definition, and the window location becomes https://nodejs.org/api/http.html#http_class_http_clientrequest
  • Now press the browser Back button.
  • Window location becomes https://nodejs.org/api/http.html again, but the page was not scrolled up.

This is because <html> and <body> have both height: 100% (this is OK), but then there is a main container <div id="content"> which also has height: 100%, and there is where the problem is:

By having a container with height: 100% within the body, the scroll is not done on the body itself, but on the container. And unfortunately the Back button does not scroll back a div (but just the body element).

The solution is to remove the height: 100% of the <div id="content"> (you can test it by removing such a CSS property in the browser inspector), but of course that requires changes for the left menu to remain fixed when the page is scrolled. Such a change just requires replacing position: absolute with position: fixed in the <div id="column2">.

To summarize:

  • In <div id="content"> remove height: 100%.
  • In <div id="column2"> set position: fixed.

Activity

  1. ibc
    changed the title [-]Back button does not scroll the page[/-] [+][documentation site] Back button does not scroll the page (solution included)[/+] on May 13, 2016
  2. ibc commented on May 13, 2016

    @ibc
    ibc
    on May 13, 2016
    Author
    More actions

    The only disadvantage of the above solution is that, when scrolling the left menu and reaching the end of it, the main page is scrolled. This is how the web works however. But I've a mini library for that:

    https://github.com/ibc/dontscrollthebody

    :)

  3. mscdex
    added
    docIssues and PRs related to Node.js documentation.
    on May 13, 2016
  4. mscdex commented on May 13, 2016

    @mscdex
    mscdex
    on May 13, 2016
    Contributor
    More actions

    /cc @nodejs/documentation

  5. ibc commented on May 13, 2016

    @ibc
    ibc
    on May 13, 2016
    Author
    More actions

    Should I report this issue in https://github.com/nodejs/nodejs.org instead?

    Note that "About this Documentation" clearly states that:

    If you find a error in this documentation, please submit an issue

    (which points to this project)

  6. lpinca commented on May 14, 2016

    @lpinca
    lpinca
    on May 14, 2016
    Member
    More actions

    @ibc does this pr #6641 fixes the issue?

  7. silverwind commented on May 15, 2016

    @silverwind
    silverwind
    on May 15, 2016
    Contributor
    More actions

    #6641 should fix this, which I'll land shortly.

  8. silverwind
    closed this as completedin bef1ec0on May 15, 2016
  9. silverwind commented on May 15, 2016

    @silverwind
    silverwind
    on May 15, 2016
    Contributor
    More actions

    https://github.com/ibc/dontscrollthebody

    I had a similar hack planned in #6641, but decided to not mess with the scrolling.

  10. silverwind
    added a commit that references this issue on May 15, 2016

    doc: fix issues related to page scrolling

    f2630d2
  11. ibc commented on May 15, 2016

    @ibc
    ibc
    on May 15, 2016
    Author
    More actions

    Yes, #6641 seems to fix it.

  12. MylesBorins
    added a commit that references this issue on May 16, 2016

    doc: fix issues related to page scrolling

    06854f1
  13. evanlucas
    added a commit that references this issue on May 17, 2016

    doc: fix issues related to page scrolling

    4f2a55f
  14. MylesBorins
    added a commit that references this issue on May 18, 2016

    doc: fix issues related to page scrolling

    126fdc3
  15. sjarmak
    added a commit that references this issue on Jul 27, 2026

    doc: fix issues related to page scrolling

    bef1ec0
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

    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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.