Removed smooth scrolling, does not work in other browsers than FF

This commit is contained in:
Shpuld Shpuldson 2017-04-12 18:47:47 +03:00
parent a675cfbb3e
commit 3f477986cf

View file

@ -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'
})
} }
} }
} }