Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep Linking Scroll #302

Open
DavieReid opened this issue Apr 3, 2023 · 4 comments
Open

Deep Linking Scroll #302

DavieReid opened this issue Apr 3, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@DavieReid
Copy link
Contributor

When you navigate to a section on a page and that page is using the Table of Contents (TOC) component the following happens:

Actual

  1. the page is briefly at the section linked
  2. the page scrolls to the top
  3. first section in the TOC is highlighted
  4. you are now lost and need to scroll back down the page to find the linked section (if you even know what it is)

Expected

  1. The linked section is highlighted in the TOC
  2. The linked section is in view (at the top of the page if the page is long enough to do so)
@DavieReid DavieReid added the bug Something isn't working label Apr 3, 2023
@lilyvc
Copy link
Contributor

lilyvc commented Apr 11, 2023

Is this still an issue? I can't recreate it

@DavieReid
Copy link
Contributor Author

The scolling to the top issue doesnt seem to be there anymore but its still not great.

Try this link --> https://mosaic-mosaic-dev-team.vercel.app/mosaic/author/refs#existing-refs

are you at the Existing Refs section?

@lilyvc
Copy link
Contributor

lilyvc commented Apr 17, 2023

Okay I had a look at this and couldn't figure it out. It loads on the correct section and then scrolls to some other part, but there aren't any instances of window.scroll in our code that could be causing it.

@DavieReid
Copy link
Contributor Author

if you go to the page (https://mosaic-mosaic-dev-team.vercel.app/mosaic/author/refs) and scroll all the way to the bottom while observing the TOC, you should see existing refs is a heading that never gets highlighted. Maybe that's the root cause...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants