question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox runs reload animation when navigating (🛠 only in development mode)

See original GitHub issue

Bug report

Describe the bug

This occurred in a next.js app set up by following the manual setup

In Firefox, a quick refresh is made when navigating from one page to another. I am just using 2 simple pages.

  1. index.js
import Link from 'next/link'
...
<Link href="/about" />
...
  1. about.js
import Link from 'next/link'
...
<Link href="/" />
...

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to terminal
  2. mkdir next-firefox-refresh-test
  3. yarn init -y
  4. yarn add next react react-dom
  5. Add the following to package.json
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }
  1. mkdir pages && cd pages && touch index.js && touch about.js
  2. Open project in desired code editor
  3. Setup a basic functional component in each file and place a <Link href="{YOUR_LINK}">{YOUR_PAGE}</Link> in each component’s return statement. Link the pages to each other.
  4. yarn run dev
  5. Open http://localhost:3000 in Firefox

Expected behavior

When clicking the link to the other page, a navigation without a reload/refresh should happen.

Screenshots

next-firefox-unwanted-refresh

System information

  • OS: macOS
  • Browser: Firefox
  • Version of Next.js: ^9.3.5
  • Version of Node.js: 12.8.0

Additional context

What I have tried

  • Adding as="/" and as="/about"
  • Different browsers (works in other browsers)
  • Setting up the project using both methods here

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ijjkcommented, Apr 20, 2020

This seems to only occur in development and may be triggered in Firefox from the server-sent events connection used for HMR being disconnected and re-connected. The animation isn’t triggered on a production site leveraging Next.js like https://zeit.co

Kapture 2020-04-20 at 15 36 09

0reactions
balazsorban44commented, Jan 30, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox runs reload animation when navigating ( 🛠 only in ...
Hi, Firefox seems to be showing the reload animation on client side navigations but it is not actually doing a full transition as...
Read more >
Work with animations — Firefox Source Docs documentation
Animation inspector¶ · Right-click in the box and select “Inspect Element” · Make sure the selected element is the <div class="channel"> · Switch...
Read more >
Reload/stop button's animation seems to stop after entering ...
The animations returned when I restarted my browser session, but go away the moment I go into and then leave customize mode. I...
Read more >
Websites show a spinning wheel and never finish loading
This article explains what to do when specific websites (not all) start to load, but never finish (i.e. the tab displays a spinning...
Read more >
Responsive Design Mode - Firefox Source Docs - Mozilla
From the Developer Tools toolbox: Press the Responsive Design Mode button in the ... Reload when user agent is changed: when this option...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found