Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger UI opens link in new page #7326

Closed
dvarrazzo opened this issue May 28, 2021 · 3 comments
Closed

Swagger UI opens link in new page #7326

dvarrazzo opened this issue May 28, 2021 · 3 comments

Comments

@dvarrazzo
Copy link

dvarrazzo commented May 28, 2021

The problem comes with the pages generated by FastAPI: advices about how to customise it are welcome.

All links, including intra-page ones, are rendered with target="_blank". This is a major usability issue and make documentation very hard to use.

@hkosova
Copy link
Contributor

hkosova commented May 28, 2021

Duplicate of #3473.

@hkosova hkosova closed this as completed May 28, 2021
@dvarrazzo
Copy link
Author

Uhm... I am somewhat confident that a few months ago this wasn't happening. Any chance of that or I'm wrong?

@hkosova
Copy link
Contributor

hkosova commented May 28, 2021

It's not a recent change, it's been a few years.

Here are some related developer comments from #3498 (comment):

As for external links - we used to open them in the same tab, but due to (very) popular demand, implemented the opening in a new tab. It makes sense - if you navigate away from the documentation every time, it can break the flow.

[...] #3473 is talking about something a bit different - local links should not open in new tabs - that is, other anchors in the same instance of swagger-ui, should just jump to those anchors. However, I'm not sure our markdown parser generates those anchors in the first place, making this a harder problem to solve.

So external links having target="_blank" is by design, and the issue with internal anchor links is tracked in #3473.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants