-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
What version of Next.js are you using?
11.0.2-canary.4
What version of Node.js are you using?
12.0.0
What browser are you using?
Chrome, Firefox, Safari
What operating system are you using?
macOS
How are you deploying your application?
next start, Vercel
Describe the Bug
Listening to the routers hashChangeStart event worked in 11.0.1 to initiate smooth-scrolling behavior.
I noticed in initial tests of the latest Canary version that this event is no longer triggered.
Expected Behavior
Fire hashChangeStart when the hash changes
To Reproduce
Local tests show that this problem exists since version 11.0.2-canary.0.
The hashChangeStart event gets not used too often in the project; I looked at the latest changes.
The following commit got merged a couple of days ago, part of canary.0, which causes the problem.
I guess that the condition is somehow too specific, blocking from entering.
next.js/packages/next/next-server/lib/router/router.ts
Lines 936 to 940 in be62f02
| if ( | |
| !(options as any)._h && | |
| this.onlyAHashChange(cleanedAs) && | |
| !localeChange | |
| ) { |