vue-mugen-scroll icon indicating copy to clipboard operation
vue-mugen-scroll copied to clipboard

Not working well with Quasar layouts?

Open emepyc opened this issue 8 years ago • 4 comments

I'm trying to use this component with Quasar layouts. Minimal example:

<template>
  <q-layout>
    <div class="layout-view">
        <mugen-scroll :handler="fetchData">
          loading...
        </mugen-scroll>
    </div>
  </q-layout>
</template>

Results in this error:

[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'addEventListener' of undefined"

found in

---> <MugenScroll>
       <QLayout>
         <Index> at /Users/pignatelli/src/test/infinite-test/src/components/Index.vue
           <App> at /Users/pignatelli/src/test/infinite-test/src/App.vue
             <Root>

Commenting out <q-layout></q-layout> eliminates the error. Any idea how to fix this?

emepyc avatar May 10 '17 10:05 emepyc

Hmm, seems window is undefined in your app? I just tried myself with your example and the default template of Quasar, it worked fine 😅 Would you mind providing a repo to reproduce this?

egoist avatar May 10 '17 10:05 egoist

Thanks for the quick reply! That's strange, I'm testing in the default Quasar template. I've just pushed my version: https://github.com/emepyc/infinite-test

The only changes I've made are to Index.vue: https://github.com/emepyc/infinite-test/blob/master/src/components/Index.vue

emepyc avatar May 10 '17 10:05 emepyc

Have you been able to replicate the issue? If it is working for you, could you please share a repo with the example so I can take a look?

emepyc avatar May 24 '17 11:05 emepyc

Just tried your example, no changes, no errors

2017-05-24 7 10 11

egoist avatar May 24 '17 11:05 egoist