Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

fix can not scroll to the right position #112

Open
w3yyb opened this issue Oct 26, 2021 · 0 comments
Open

fix can not scroll to the right position #112

w3yyb opened this issue Oct 26, 2021 · 0 comments

Comments

@w3yyb
Copy link

w3yyb commented Oct 26, 2021

When I first into a page ,it can't scroll to the right position ,bug if I resize the window, then it can.
To fix this bug:

First
change: return window.addEventListener("resize", h), h

to : return window.addEventListener("resize", h),window.addEventListener("load", h), h

Then
add : window.removeEventListener("load", f)
after
window.removeEventListener("resize", f)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant