Skip to content

URLs incorrectly updated after page is refreshed #437

@stefancircuit

Description

@stefancircuit

This is a weird one but bear with me.

The following will work as expected:

  1. Load the root examples URL: https://redocusaurus.vercel.app/
  2. Navigate to Examples -> Using Single YAML
  3. Click e.g. General -> Pet -> Find pet by ID

Outcome: The anchor is loaded, and the browser URL is updated correctly to: ...#tag/pet/operation/getPetById

However if you instead access the example directly (or refresh the page once you're there) it will cause a bug in the navigation:

  1. Load the example directly: https://redocusaurus.vercel.app/examples/using-single-yaml
  2. Click e.g. General -> Pet -> Find pet by ID

Outcome: The anchor is loaded BUT the browser URL is now updated to ...#tag/pet/operation/updatePet NOT ...getPetById

In fact regardless of which link is clicked, the browser URL will be set to the previous entry in the list to the one you clicked.

And indeed this behaviour is present in deployments of the plugin, not just the examples. Which is problematic because people often bookmark this openAPI-generated section rather than the top level of the docs because it has the most useful content.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions