forked from AkkomaGang/akkoma-fe
Removed smooth scrolling, does not work in other browsers than FF
This commit is contained in:
parent
a675cfbb3e
commit
3f477986cf
1 changed files with 2 additions and 10 deletions
|
@ -104,18 +104,10 @@ const Status = {
|
||||||
if(this.status.id == newfocus) {
|
if(this.status.id == newfocus) {
|
||||||
let rect = this.$el.getBoundingClientRect()
|
let rect = this.$el.getBoundingClientRect()
|
||||||
if(rect.top < 100)
|
if(rect.top < 100)
|
||||||
window.scrollBy({
|
window.scrollBy(0, rect.top - 200)
|
||||||
left: 0,
|
|
||||||
top: rect.top - 200,
|
|
||||||
behavior: 'smooth'
|
|
||||||
})
|
|
||||||
// will be useful when scrolling down to replies or root posts is in
|
// will be useful when scrolling down to replies or root posts is in
|
||||||
else if(rect.bottom > window.innerHeight - 100)
|
else if(rect.bottom > window.innerHeight - 100)
|
||||||
window.scrollBy({
|
window.scrollBy(0, rect.bottom + 200)
|
||||||
left: 0,
|
|
||||||
top: rect.bottom + 200,
|
|
||||||
behavior: 'smooth'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue