Next.js · Senior · Question 62 of 75

The site uses scroll-behavior: smooth, and after upgrading to Next.js 16 every navigation scrolls smoothly to the top. How do you restore instant jumps?

Explanation

Next.js 16 no longer overrides scroll-behavior by default because the manipulation was costly on every navigation. The attribute opts back into the old behavior.

Further reading

Problem with a question

Next.js · Senior · question 62

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz