We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50defdd commit 8182d92Copy full SHA for 8182d92
demo/src/app/common/add-nav/add-nav.component.ts
@@ -19,8 +19,8 @@ export class AddNavComponent {
19
const anchor: string = item.dataset.anchor;
20
const target: HTMLElement = this.document.getElementById(anchor);
21
const header: HTMLElement = this.document.getElementById('header');
22
- const headerIndent: number = header.offsetHeight + 6;
23
- this.document.body.scrollTop = target.offsetTop - headerIndent;
+ const targetPosY: number = target.offsetTop - header.offsetHeight - 6;
+ window.scrollTo(0, targetPosY);
24
}
25
26
0 commit comments