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

redoc-cli: sidebar and page scrolling issues #1168

Closed
ZQ-PSK opened this issue Feb 6, 2020 · 15 comments
Closed

redoc-cli: sidebar and page scrolling issues #1168

ZQ-PSK opened this issue Feb 6, 2020 · 15 comments

Comments

@ZQ-PSK
Copy link

ZQ-PSK commented Feb 6, 2020

I am using redoc-cli 0.9.5 on MacOS Catalina.

In addition to this issue, I've been having another problem since updating Chrome somewhere in the last 24 hours.

  1. In the sidebar, when clicked once, the item does not expand. Clicking twice takes me to the that tag.
  2. The page always returns back to top after scrolling a bit up or down. Interestingly, when that happens, for a split second I can see the last clicked tag expanded before it collapses again.

One exception is that when using serve instead of bundle, the sidebar expanding seems to work until I click the same tag twice in a row (so expand and then collapse it) or if I scroll down far enough for the sidebar to disappear from view.

I did not observe any of the above in Firefox (72.0.2) or Safari (15608.5.11)

@yurasmetanka
Copy link

Same issue on Fedora, Chrome 80.0.3987.87, on previous Chrome versions everything works fine

@ZQ-PSK
Copy link
Author

ZQ-PSK commented Feb 6, 2020

It may also be worth mentioning that I've opened redoc-cli static bundle files that I generated back in November, with redoc-cli 0.8.6/redoc20.0.0-rc13, and the behavior is the same.

UPDATE:
Firefox got updated to compilation ID 20200117190643 and now also has problems. I can expand menus (sometimes), but clicking a method doesn't seem to do anything.

@alecwcp
Copy link

alecwcp commented Feb 8, 2020

Same issue on Linux (Ubuntu 18.04) with Chrome 80.0.3987.87-1. Previous installed Chrome version was 79.0.3945.130-1, didn't have this issue.

@RomanHotsiy
Copy link
Member

I've been traveling for the last week so sorry for the delay. I'm on it now.

@RomanHotsiy
Copy link
Member

Should be fixed on redoc-cli@0.9.6 and (redoc@v2.0.0-rc.23).

Could anyone please verify it so I can close this issue?

@ZQ-PSK
Copy link
Author

ZQ-PSK commented Feb 9, 2020

@RomanHotsiy I'll let you know tomorrow when I'm back at work.

@alecwcp
Copy link

alecwcp commented Feb 9, 2020

@RomanHotsiy Thanks, this is resolved when using <script src="https://cdn.jsdelivr.net/npm/redoc@v2.0.0-rc.23/bundles/redoc.standalone.js"> </script>. When will this be available at <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>?

@ZQ-PSK
Copy link
Author

ZQ-PSK commented Feb 10, 2020

@RomanHotsiy serve seems to be working OK, but bundle is completely mixed up (and on Chrome still has the problem that if I scroll too far, it returns to the top of the page):
image

@RomanHotsiy
Copy link
Member

@IBrokeYourCode, your mixed up bundle looks unrelated to the original issue. Are you able to consistently reproduce this broken bundle?

@ZQ-PSK
Copy link
Author

ZQ-PSK commented Feb 10, 2020

@RomanHotsiy
Yes, I tried it on a few different specs, including petstore.yaml from the Swagger website. The effect is the same every time.
After reverting to redoc-cli 0.9.5, the mix-up does not occur.

Should I open a new issue for this?

@RomanHotsiy
Copy link
Member

Well, I can't reproduce it.

npx redoc-cli@0.9.6 bundle https://redocly.github.io/redoc/openapi.yaml

Produces correct page.

Could you share your exact command/options used?

@ZQ-PSK
Copy link
Author

ZQ-PSK commented Feb 10, 2020

When I tried npx as in your example, the bundle is correct. I used yarn to install redoc-cli globally on my system, maybe something's wrong here.

Re-installing redoc-cli@0.9.6 with npm resolved the issue.

Sorry for the false alarm.

@jpinkster
Copy link

Confirming that upgrading to 0.9.6 fixes the chrome issue

@RomanHotsiy
Copy link
Member

Thanks!

@ricky-at-domain
Copy link

the issue still exists when I insert it into WordPress custom HTML widget
<script src="https://cdn.jsdelivr.net/npm/redoc@v2.0.0-rc.23/bundles/redoc.standalone.js"> </script>

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

6 participants