-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Describe the bug
when I try to pass window to useInfiniteScroll as the element to track scroll on it, this issue occurs.
the error:
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'
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 the setArrivedState
function in the useScroll.
Reproduction
System Info
-
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
wdonray and MinatoHikari
Metadata
Metadata
Assignees
Labels
No labels