mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-14 04:24:51 +00:00
Use a cross browser safe solution to get scroll top
This commit is contained in:
parent
830f3762ef
commit
aca3b37134
1 changed files with 3 additions and 1 deletions
|
@ -132,7 +132,9 @@ const Timeline = {
|
|||
}
|
||||
if (count > 0) {
|
||||
// only 'stream' them when you're scrolled to the top
|
||||
if (window.pageYOffset < 15 &&
|
||||
const doc = document.documentElement
|
||||
const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)
|
||||
if (top < 15 &&
|
||||
!this.paused &&
|
||||
!(this.unfocused && this.$store.state.config.pauseOnUnfocused)
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue