Skip to content

Going back to a PLP from a PDP drops user at bottom of the page #1972

Closed

Description

@erinmorrissey-hearst

Describe the bug

If a user is on a PLP, clicks into a product, then from the PDP clicks the browser back button, the user is dropped at the very bottom of the PLP and sees the footer of the site (see video below).

Screen.Recording.2023-08-21.at.12.37.33.PM.-.480p.mov

Expected behavior
After clicking the back button from the PDP, the user should see the product they just returned from roughly centered on the page. See the experience here for an example: https://www.patagonia.com/shop/web-specials

Current behavior
Not sure, I have not been able to find what code (if any) is causing this bug.

Steps to reproduce

  1. Visit the "Office" category PLP on the starter store: https://starter.vtex.app/office
  2. Click "Load more products" a couple times
  3. Click into a product
  4. Click the browser back button
  5. Observe that you are brought back to the footer of the site instead of the previously clicked product

Possible Solution
Center the previously clicked product on the page (or at the very least, bring the user back to the top of the page rather than the bottom)

Workspace
n/a

Additional context
n/a

Activity

  1. added
    bug
    on Aug 21, 2023
  2. hellofanny commented on Aug 21, 2023

    @hellofanny
    Contributor

    Thanks for reporting it! I've created an internal task to take a look into this bug. 🐞 🚀

  3. icazevedo commented on Oct 9, 2023

    @icazevedo
    Contributor

    Fixed on #2054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions