You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ScrollYOffset option seems to work if you navigate to a page already loaded, but if you refresh or navigate directly to an API page the offset gets set to 0. So the sidebar will scroll under the navbar.
It seems this is in place to prevent the warning that appears when using a selector on a direct page load:
scrollYOffset value is a selector to non-existing element. Using offset 0 by default
I don't know how to preserve the offset if you want to use a selector, but it would at least be nice to keep the value if you set it to something other than a selector.
The text was updated successfully, but these errors were encountered:
I took a shot at creating a partial fix for this issue. See the linked PR. Basically just keeping the logic to disable this option when it is set to a selector.
ScrollYOffset option seems to work if you navigate to a page already loaded, but if you refresh or navigate directly to an API page the offset gets set to 0. So the sidebar will scroll under the navbar.
This affects the examples as well, so you can see what happens by directly navigating here and scrolling: https://redocusaurus.vercel.app/examples/using-single-yaml/
It seems that this is issues is related to this line:
redocusaurus/packages/docusaurus-theme-redoc/src/utils/useSpec.ts
Line 28 in e812293
It seems this is in place to prevent the warning that appears when using a selector on a direct page load:
I don't know how to preserve the offset if you want to use a selector, but it would at least be nice to keep the value if you set it to something other than a selector.
The text was updated successfully, but these errors were encountered: