-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useScroll: cannot pass window to "getComputedStyle" as an element #3136
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
If I'm not mistaken, I remember that I used document instead of window object as the element and that worked for my case, |
It's not solved yet because MR is not merged. Maybe let's ask @antfu to re-review: #3605 |
The Scroll is on an HtmlElement. Not on window/document. |
Facing the same issue on a component which is a componentinstance. Would love to see the above PR merged |
Describe the bug
when I try to pass window to useInfiniteScroll as the element to track scroll on it, this issue occurs.
the error:
I checked the source of error found that since the useInfiintieScroll passes the element to useScroll and the useScroll passes the element to
getComputedStyle
to get the desired element data, the error is occurs.The
getComputedStyle
calls inside thesetArrivedState
function in the useScroll.Reproduction
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: