From 86603dec48bfd185df65ba203730bce7e7079522 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Tue, 21 Mar 2023 20:24:08 +0100 Subject: [PATCH] Fixing scroll hidden issue #587 --- src/frontend/app/model/page.helper.ts | 11 ++++++----- src/frontend/styles.css | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/frontend/app/model/page.helper.ts b/src/frontend/app/model/page.helper.ts index 092d9f66..6fd55005 100644 --- a/src/frontend/app/model/page.helper.ts +++ b/src/frontend/app/model/page.helper.ts @@ -9,8 +9,8 @@ export class PageHelper { return this.supportPageOffset ? window.pageYOffset : this.isCSS1Compat - ? document.documentElement.scrollTop - : document.body.scrollTop; + ? document.documentElement.scrollTop + : document.body.scrollTop; } public static set ScrollY(value: number) { @@ -33,8 +33,8 @@ export class PageHelper { return this.supportPageOffset ? window.pageXOffset : this.isCSS1Compat - ? document.documentElement.scrollLeft - : document.body.scrollLeft; + ? document.documentElement.scrollLeft + : document.body.scrollLeft; } public static showScrollY(): void { @@ -42,7 +42,8 @@ export class PageHelper { } public static isScrollYVisible(): boolean { - return PageHelper.body.style.overflowY === 'scroll'; + return PageHelper.body.style.overflowY === 'scroll' || + (!PageHelper.body.style.overflowY && document.documentElement.scrollHeight > document.documentElement.clientHeight); } public static hideScrollY(): void { diff --git a/src/frontend/styles.css b/src/frontend/styles.css index 5d233337..e07e2bf5 100644 --- a/src/frontend/styles.css +++ b/src/frontend/styles.css @@ -1,5 +1,4 @@ - a { text-decoration: none; } @@ -18,7 +17,7 @@ bs-dropdown-container { } /* TODO: remove popover in ngx-bootstrap, bootstrap 5.3-alpha is fixed */ -.bs-popover-top, .bs-popover-bottom{ +.bs-popover-top, .bs-popover-bottom { position: absolute; } @@ -31,6 +30,7 @@ bs-dropdown-container { element.style { width: 100px; } -[data-bs-theme=dark] .btn:not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-primary):not(.btn-success){ + +[data-bs-theme=dark] .btn:not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-primary):not(.btn-success) { --bs-btn-color: var(--bs-body-color); }