hlxsites / prisma-cloud-docs-website

blocks and gdoc authored content for https://docs.prismacloud.io
Apache License 2.0
3 stars 2 forks source link

Left nav - selected topic jumps out of view #62

Closed iansk closed 1 year ago

iansk commented 1 year ago

If you scroll down on the left nav bar and select a topic, when the topic loads, the left nav bar snaps back to the top. If the topic wasn't initially in view, and you needed to scroll down to find it, after the page loads, it's no longer in view again.

Whatever is selected in the left nav bar should stay in view - actually, it should stay in exactly the same position so that's easy to understand where you are in the site with a single glance.

To reproduce:

  1. Go to this page.

  2. Scroll down to the last chapter in the book "How-to guides", and expand it.

    how-to-guides-visible
  3. Click on an item under "How-to guides". For example, "Disable automatic learning".

    left-nav-bar-reset-top

Results:

The left nav bar resets right to the top.

Expected Results:

The left nav bar should be in exactly the same position it was before "Disable automatic learning" was clicked (still visible on screen)

iansk commented 1 year ago

@maxakuru I'm still see this issue.

Repro:

  1. Open a new tab in your browser and go to this page: https://main--prisma-cloud-docs-website--hlxsites.hlx.live/prisma/prisma-cloud/en/compute/pcee/admin-guide/vulnerability-management/registry-scanning/scan-google-artifact-registry

Results:

Notice that the left nav is scrolled to the top. In the left nav, you can't see which topic is selected.

left-nav-topic-not-visible-current-result

Expected results:

The topic selected is visible in the left nav.

left-nav-topic-not-visible-expected-result