Problem about document.body.scrollTop return 0 in Firefox

If you need to get document.body.scrollTop in website. You should use this:

const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;