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

Clicking on the “See more FAQs about Firefox Relay” link redirects the Firefox user to the bottom of the FAQs page #2187

Closed
AOiegas opened this issue Jul 12, 2022 · 3 comments
Labels
🐛 bug Something isn't working prod_bug Label for bugs discovered in production, but reproducible also in -dev and stage.

Comments

@AOiegas
Copy link
Collaborator

AOiegas commented Jul 12, 2022

Build:

  • Stage;
  • Production;

Affected Platforms:

  • Windows 10;

Browsers tested on:

  • Firefox, Release version;

Prerequisites:

  • Do NOT be signed in into a Firefox Relay account;

Steps to reproduce:

  1. Go to the Relay home/landing page;
  2. Scroll down to the FAQs section at the bottom of the page;
  3. Click on the “See more FAQs about Firefox Relay” link;
  4. Observe the results;

Expected result:

  • Clicking on the link redirects the user to the top of the FAQs page;

Actual result:

  • Clicking on the link redirects the user to the bottom of the FAQs page instead;

Notes:

  • This happens only on Firefox. Chrome and Edge scroll the user to the top of the page;
  • See attached media:
    linkfaq
@AOiegas AOiegas added 🐛 bug Something isn't working prod_bug Label for bugs discovered in production, but reproducible also in -dev and stage. labels Jul 12, 2022
@joaonunomota
Copy link
Contributor

I haven't been able to reproduce this with version 112.0.1 (64-bit) of Firefox on Windows 10. Is there any more testing needed to confirm if this is no longer an issue?

example

@Vinnl
Copy link
Collaborator

Vinnl commented Apr 20, 2023

Thanks for looking into this. It looks like Next.js now scrolls to the top by default, which I think was added in vercel/next.js#42492 after this issue was created. So I think this can be closed.

@Vinnl Vinnl closed this as completed Apr 20, 2023
@vadym-lohvynovych
Copy link

vadym-lohvynovych commented Jul 7, 2023

On my project we have skeletons which we need to show while new page is loading, so once new page started loading we needed to catch it and scroll to the top immediately because if we do not scroll user will see bottom of the page if his scroll position was not 0.
Here's the solution which can also help you:
You can catch route change event and scroll the page programatically (there are also routeChangeComplete and routeChangeError events)

const handleStart = (path: AppPath, config: { shallow: boolean }) => {
  if (!config.shallow) {
    window.scrollTo(0, 0);
  }
};

router.events.on('routeChangeStart', handleStart);

return () => {
  router.events.off('routeChangeStart', handleStart);
};

this code should be called on mount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working prod_bug Label for bugs discovered in production, but reproducible also in -dev and stage.
Projects
None yet
Development

No branches or pull requests

4 participants