Skip to content
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

useInfiniteScroll doesn't work with window #3060

Closed
7 tasks done
innocenzi opened this issue May 4, 2023 · 2 comments
Closed
7 tasks done

useInfiniteScroll doesn't work with window #3060

innocenzi opened this issue May 4, 2023 · 2 comments

Comments

@innocenzi
Copy link
Contributor

innocenzi commented May 4, 2023

Describe the bug

Using useInfiniteScroll with window triggers an exception: Uncaught TypeError: Window.getComputedStyle: Argument 1 does not implement interface Element.

I think the issue appeared with d3a2bca. It uses useScroll which uses getComputedStyle on window.documentElement which is illegal, hence triggering the error.

Reproduction

https://stackblitz.com/edit/vitejs-vite-5dmbm2?file=src/App.vue

System Info

System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 582.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 9.6.4 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 112.0.5615.137
    Firefox: 112.0.2
    Safari: 16.4
  npmPackages:
    @vueuse/components: ^10.1.2 => 10.1.2 
    @vueuse/core: ^10.1.2 => 10.1.2 
    @vueuse/head: ^1.1.26 => 1.1.26 
    @vueuse/motion: 2.0.0-beta.12 => 2.0.0-beta.12 
    vue: ^3.2.47 => 3.2.47

Used Package Manager

pnpm

Validations

@smallnine9
Copy link
Contributor

will fix soon

@innocenzi
Copy link
Contributor Author

Probably fixed by #3086, will re-open if next release doesn't actually fix the issue. Thanks @smallnine9 👍

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

No branches or pull requests

2 participants