mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 16:31:04 +00:00
Fix weird scroll position bug
This commit is contained in:
parent
cb2cefa5ba
commit
741e249827
@ -78,8 +78,13 @@
|
||||
document.body.style.position = `fixed`
|
||||
}
|
||||
} else if (!isNil(scrollY)) {
|
||||
document.body.setAttribute("style", "")
|
||||
window.scrollTo(0, scrollY)
|
||||
const offset = scrollY
|
||||
|
||||
// I don't know why this timeout is necessary
|
||||
setTimeout(() => {
|
||||
document.body.setAttribute("style", "")
|
||||
window.scrollTo(0, offset)
|
||||
}, 100)
|
||||
|
||||
scrollY = null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user