Skip to content

Commit 4e98005

Browse files
committed
Make sticky footer appear even for scrollable pages
The sticky footer for account creation would appear for pages with a lot of records and folders only on scroll, which is not correct, so the checks for scroll height had to be removed Issue: PER-10316 Create account sticky footer disappears
1 parent d0bf5a3 commit 4e98005

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

src/app/share-preview/components/share-preview-footer/share-preview-footer.component.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,14 @@ export class SharePreviewFooterComponent implements OnInit, OnDestroy {
5151
if (this.scrollTimeout) {
5252
window.clearTimeout(this.scrollTimeout);
5353
}
54-
if (
55-
window.scrollY + document.body.clientHeight ===
56-
document.body.scrollHeight
57-
) {
58-
this.show();
59-
} else {
60-
this.scrollTimestamp = e.timeStamp;
61-
window.setTimeout(() => {
62-
if (this.scrollTimestamp === e.timeStamp) {
63-
if (!document.querySelector('pr-dialog')) {
64-
this.show();
65-
}
54+
this.scrollTimestamp = e.timeStamp;
55+
window.setTimeout(() => {
56+
if (this.scrollTimestamp === e.timeStamp) {
57+
if (!document.querySelector('pr-dialog')) {
58+
this.show();
6659
}
67-
}, 1000);
68-
}
60+
}
61+
}, 1000);
6962
});
7063
}
7164

@@ -75,9 +68,7 @@ export class SharePreviewFooterComponent implements OnInit, OnDestroy {
7568
});
7669

7770
setTimeout(() => {
78-
if (document.body.scrollHeight === document.body.clientHeight) {
79-
this.show();
80-
}
71+
this.show();
8172
}, 1000);
8273
}
8374

0 commit comments

Comments
 (0)