Stale search parameters when using an anchor/fragment in the as
property of Link
#67951
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Pages Router
Related to Pages Router.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/quirky-links-34d7yr
To Reproduce
Current vs. Expected behavior
The reproduction shows the correct behaviour when the url does not contain an anchor part.
We would expect the same behaviour even when the anchor part is present.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 8198 Available CPU cores: 4 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: 1.22.19 pnpm: 8.15.4 Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Navigation, Pages Router
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Other (Deployed)
Additional context
We tested the issue on our version of Next.js (14.2.0) and in the very latest version (14.2.5).
The text was updated successfully, but these errors were encountered: