Skip to content

Smooth scroll breaks back button #1767

@danieljl

Description

@danieljl

Current Behavior

Smooth scroll is triggered when a link to a different section on the same page is clicked, e.g. when clicking a table of contents. After clicking a section on a table of contents, users often want to go back to the table of contents. However, users cannot do that because the URL is not appended with the hash (section ID). This can be demonstrated at https://kswedberg.github.io/jquery-smooth-scroll/demo/.

Proposed Solution:

  1. Disable smooth scroll; or
  2. Enable hashchange feature of jQuery smooth scroll. There are two ways to do that:
    a. Using native hashchange DOM event: demo, source code.
    b. Not using native hashchange DOM event: demo, source code.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions