jpmorganchase / mosaic

https://mosaic-mosaic-dev-team.vercel.app

Home Page:https://mosaic-mosaic-dev-team.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep Linking Scroll

DavieReid opened this issue · comments

commented

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)
commented

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

commented

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?

commented

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.

commented

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...