1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00

Fixing scroll hidden issue #587

This commit is contained in:
Patrik J. Braun 2023-03-21 20:24:08 +01:00
parent 51a473f4f0
commit 86603dec48
2 changed files with 9 additions and 8 deletions

View File

@ -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 {

View File

@ -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);
}