diff --git a/lib/components/Redoc/redoc.ts b/lib/components/Redoc/redoc.ts index e8ed112400..303445cc61 100644 --- a/lib/components/Redoc/redoc.ts +++ b/lib/components/Redoc/redoc.ts @@ -78,7 +78,7 @@ export class Redoc extends BaseComponent implements OnInit { //parse options (top level component doesn't support inputs) optionsMgr.parseOptions( this.element ); let scrollParent = detectScollParent( this.element ); - if (scrollParent === DOM.defaultDoc().body) scrollParent = window; + if (scrollParent === (document.scrollingElement || document.body)) scrollParent = window; optionsMgr.options.$scrollParent = scrollParent; this.options = optionsMgr.options; this.lazyTasksService.allSync = !this.options.lazyRendering;