Static GitHub Issues

[602] doesn't work window.onscroll

prev: nuxt.js + Firebase without VueFire - Query
next: Extend Global SCSS Stylesheet in Component

Hi guys

I have a problem and don't found the solution. I want to detect the scroll of the user, but when I try doesn't work. This is my code.

mounted () {
  window.onscroll = e => {
    console.log(e)
  }
}

Too I put this code.

mounted () {
  window.addEventListener('scroll', e => {
    console.log(e)
  }, false)
}

neither with window neither document

Thanks

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c526">#c526</a>)</em></sub></div>