-
Notifications
You must be signed in to change notification settings - Fork 602
Cannot read $el of undefined with $refs.vsl for tabs #173
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
Comments
Ok, I found out what the issue was in my case: A few things that are important for the issue:
This let to the following scenario:
Removing the key that was on the But still maybe you want to change the condition from |
Nope, sorry the bug still happens. The last 12 minutes were the happiest but the bug is back... |
I update condition to |
Thank you very much! |
Uh oh!
There was an error while loading. Please reload this page.
Basically this Bug again #57
The Bug is back.
I'm sadly not yet able to reproduce the bug within a jsfiddle but when we just imagine that
this.$refs.vsl
can be undefined then we notice that the current condition in line 271vue-virtual-scroll-list/dist/index.js
Lines 269 to 272 in fe5226d
in
onScroll
will fail with the errorCannot read $el of undefined
.When we change the condition to be
vsl ? (vsl.$el || vsl).scrollTop : 0;
instead then it will successfully scroll back to the top even with no wrapper defined.A bit more about my setup and more information about the cause
I basically have this setup in nuxt where I have a dynamic url which defines which filter on the list is applied:
/inbox
as url will show you all inbox items/all
will show you all the items and so on.Now I have a sidebar which lets me navigate between the views/urls via nuxt/vue router
this.$router.push({ path: '/all' })
. Now while switching back and forth I sometimes get this stacktrace https://imgur.com/a/jocKH2x with my parent component emittingbeforeDestroy
in between while this plugin is in hismounted
function with a setoffset
but novsl
which leads to this errorI hope I could provide enough detail and maybe I try again to create this jsfiddle for you
The text was updated successfully, but these errors were encountered: