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.

Scrollbar is not working in Next.js

See original GitHub issue

In the Next.js, I am getting below warning.

Warning: Prop style did not match. Server: “position:absolute;top:0;left:0;right:0;bottom:0;overflow:scroll;-webkit-overflow-scrolling:touch;margin-right:0;margin-bottom:0” Client: “position:absolute;top:0;left:0;right:0;bottom:0;overflow:scroll;-webkit-overflow-scrolling:touch;margin-right:-17px;margin-bottom:-17px”`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

38reactions
MasterEriccommented, Feb 15, 2020

If your app runs on both client and server, activate the universal mode. This will ensure that the initial markup on client and server are the same.

Add the universal={true} parameter to your <Scrollbars> element.

See here for more info.

6reactions
kolnogorovcommented, Aug 25, 2020

For me it doesn’t work even with universal={true}, still get the same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React, Nextjs, TailwindCSS. Scroll not working - Stack Overflow
I am using Tailwind Css in this project. The 'overflow-y-scroll' doesnt work. The overflow still happens even this property is empty. reactjs ...
Read more >
next/link | Next.js
Enable client-side transitions between routes with the built-in Link component.
Read more >
Smooth scroll not working with IDs : r/nextjs - Reddit
I am using next js with tailwind and i have created a html property in my global css… ... r/nextjs - Smooth scroll...
Read more >
[SOLVED] Hide Scrollbar in Tailwind css React js/Next js
Hello today in this video i'm going to show you how to hide scrollbar, in tailwind by installing :Source Link ...
Read more >
How to fight the <body> scroll. First of all - Medium
The fix for the second problem is simple — just change scroll behavior: ... scroll-lock - A Javascript utility library for the native...
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