Closed gambolputty closed 7 years ago
Can't reproduce this in the demo, though. I wonder what's wrong with my code :/
Sometimes I won't get the "duplicate-keys"-error, but the following one, when dragging the scrollbar up very fast:
vue.common.js?e881:435 DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at Object.insertBefore (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:3943:14)
at updateChildren (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4380:28)
at patchVnode (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4450:29)
at updateChildren (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4399:13)
at patchVnode (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4450:29)
at updateChildren (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4366:9)
at patchVnode (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4450:29)
at updateChildren (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4366:9)
at patchVnode (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4450:29)
at VueComponent.patch [as __patch__] (eval at <anonymous> (http://localhost:8080/app.js:723:1), <anonymous>:4574:9)
logError @ vue.common.js?e881:435
It seems that this issue is related to non-Trackpad mouse devices and their different scrolling behaviour, since I'm not getting these errors on my Mac.
I think I fixed it. I had the same problem with another piece of code, but I guess it applies to this issue, too.
The problem was, that I used two v-if
-statments after another (inside <template>
), when using v-if
and v-else-if
makes more sense to differentiate between the two type blocks.
Hello!
I drag the scrollbar with my mouse up and down and everything works fine, no errors. I do the same again very fast, the virtual scroller breaks and I get the following error in my console:
OS: Windows 10 8 GB RAM Browser: Google Chrome 56.0.2924.87
My template:
The
itemKey
s are unique and created like so:new Date().toJSON() + Math.random()