redocusaurus icon indicating copy to clipboard operation
redocusaurus copied to clipboard

Links to anchors do not properly reposition page

Open OlaStenberg opened this issue 2 years ago • 4 comments

I noticed the same issue described on https://github.com/rohit-gohri/redocusaurus/issues/110

Can be reproduced at https://sushi-docs-rfv1c3av5-teamsushi.vercel.app/api/furo

If you'd like more context, here's the repo: https://github.com/sushiswap/sushi-docs At the time of writing this is on a feature branch: feature/redocusaurus-and-furo

OlaStenberg avatar Jun 22 '22 06:06 OlaStenberg

That's strange, it works in the examples website. Can you try adding operationId to the openapi.yaml? I think giving them a unique id might make it work, since that's the only difference b/w your docs and the example

rohit-gohri avatar Jun 22 '22 14:06 rohit-gohri

Like this? https://github.com/sushiswap/sushi-docs/commit/c600903ea45be88a11e9615b0d0416a5cda8a531

Good idea, but unfortunately it didn't make a difference: https://sushi-docs-2cmtz9li9-teamsushi.vercel.app/api/furo

OlaStenberg avatar Jun 22 '22 14:06 OlaStenberg

I was experiencing the same issue. For me it ended up being because I had scroll-behavior: smooth; on the body. took it off and it started working.

Checked your repo and see you have that CSS property as well. Try that!

isaiahdahl avatar Jul 29 '22 19:07 isaiahdahl

I was experiencing the same issue. For me it ended up being because I had scroll-behavior: smooth; on the body. took it off and it started working.

Checked your repo and see you have that CSS property as well. Try that!

Awesome, thanks, it worked!

OlaStenberg avatar Jul 29 '22 20:07 OlaStenberg

Closing this since the issue was solved

rohit-gohri avatar Feb 10 '23 00:02 rohit-gohri