From 315b7593bf93508855b0343f06e157837a121c91 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Wed, 30 Mar 2022 09:44:41 -0400 Subject: [PATCH] Apply smooth scrolling to docs only --- frontend/src/app/components/docs/docs.component.ts | 5 +++++ frontend/src/styles.scss | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/docs/docs.component.ts b/frontend/src/app/components/docs/docs.component.ts index 605a453ab..7ef6cade6 100644 --- a/frontend/src/app/components/docs/docs.component.ts +++ b/frontend/src/app/components/docs/docs.component.ts @@ -23,5 +23,10 @@ export class DocsComponent implements OnInit { this.activeTab = ( url[2].path === "rest" ) ? 0 : 1; this.env = this.stateService.env; this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) ); + document.querySelector( "html" ).style.scrollBehavior = "smooth"; + } + + ngOnDestroy(): void { + document.querySelector( "html" ).style.scrollBehavior = "auto"; } } diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 3c38b5557..09c885987 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -50,7 +50,6 @@ $dropdown-link-active-bg: #11131f; html, body { height: 100%; - scroll-behavior: smooth; } body {