File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -765,8 +765,11 @@ export default class RapiDoc extends LitElement {
765
765
this . scrollTo ( elementId ) ;
766
766
}
767
767
} else if ( this . renderStyle === 'focused' ) {
768
- const defaultElementId = this . showInfo ? 'overview' : this . resolvedSpec . tags [ 0 ] ?. paths [ 0 ] ;
769
- this . scrollTo ( defaultElementId ) ;
768
+ // If goto-path is provided and no location-hash is present then try to scroll to default element
769
+ if ( ! this . gotoPath ) {
770
+ const defaultElementId = this . showInfo ? 'overview' : this . resolvedSpec . tags [ 0 ] ?. paths [ 0 ] ;
771
+ this . scrollTo ( defaultElementId ) ;
772
+ }
770
773
}
771
774
}
772
775
@@ -902,7 +905,6 @@ export default class RapiDoc extends LitElement {
902
905
// for focused mode update this.focusedElementId to update the rendering, else it wont find the needed html elements
903
906
// focusedElementId will get validated in the template
904
907
this . focusedElementId = elementId ;
905
- await sleep ( 0 ) ;
906
908
}
907
909
if ( this . renderStyle === 'view' ) {
908
910
this . expandAndGotoOperation ( elementId , expandPath , true ) ;
You can’t perform that action at this time.
0 commit comments