Skip to content

Autoscroll sometimes doesn't work as intended on mobile #3

@spark-c

Description

@spark-c

On mobile, selecting a section tab doesn't always return the window to the top of the page as intended.


To Reproduce Bug:

  1. On mobile, go to "About" tab.
  2. Scroll to the bottom of the page, or at least a good portion down.
  3. Click "Contact" in the top navbar.
  4. Contact page appears, but does not scroll up as intended.
  5. Clicking "Contact" again will scroll the page to the top as expected.

Expected Behavior:
Clicking a section tab should always return the page to the desired scroll position (top)


This may be an issue with Element.scrollIntoView(). The documentation here mentions:

"The element may not be scrolled completely to the top or bottom depending on the layout of other elements."
I'm not sure what the conditions are for this to happen/not happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaScriptAddressed/Implemented with JavaScriptbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions