We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee250e3 + bc69969 commit feeba84Copy full SHA for feeba84
angular-primeng-app/src/app/app.component.ts
@@ -57,7 +57,7 @@ export class AppComponent implements OnInit, OnDestroy {
57
58
@HostListener('window:scroll', [])
59
onWindowScroll() {
60
- const yOffset = window.pageYOffset || document.documentElement.scrollTop;
+ const yOffset = window.scrollY || document.documentElement.scrollTop;
61
if (yOffset > 500) {
62
this.showScrollButton = true;
63
} else {
0 commit comments