Skip to content

Conversation

colvinco
Copy link

I noticed a regression when upgrading from 9.3.2, in focused mode previously the page would default scroll to the Overview when no # route is provided.

The getElementId changes for #852 meant that when no route is provided, the entire url would be returned, where previously an empty/undefined value would be used and hit:

RapiDoc/src/rapidoc.js

Lines 808 to 814 in 7f53d25

} else if (this.renderStyle === 'focused') {
// If goto-path is provided and no location-hash is present then try to scroll to default element
if (!this.gotoPath) {
const defaultElementId = this.showInfo ? 'overview' : this.resolvedSpec.tags[0]?.paths[0];
this.scrollToPath(defaultElementId);
}
}
- which doesn't happen if the url is returned.

I noticed a regression when upgrading from 9.3.2, in focused mode previously the page would default scroll to the `Overview` when no `#` route is provided.

The getElementId changes for rapi-doc#852 meant that when no route is provided, the entire url would be returned, where previously an empty/undefined value would be used and hit https://github.com/rapi-doc/RapiDoc/blob/7f53d25959e5a4e1beb4b610aaef445b896838f2/src/rapidoc.js#L808-L814 - which doesn't happen when the url is returned.
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

Successfully merging this pull request may close these issues.

1 participant