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

v1.0.0-alpha.2: Uncaught TypeError: Cannot read property '__vfrag__' of null #1249

Closed
humanismusic opened this issue Sep 3, 2015 · 5 comments

Comments

@humanismusic
Copy link

Update: Reproduction here

Occurring when dragging a list item from one unordered list to another - in this case when using RubaXa/Sortable to manage lists.

Appears to be caused by the location of the comment node after items are moved, according to comments under #437 - typeError 'Cannot read property 'vue' of null'. That similar issue was closed as could not be reproduced.

Billiam later provided more details as well as a jsfiddle example.

Now that v1.0.0 uses 'v-for' instead of 'v-repeat' it generates the error: Cannot read property 'vfrag' of null.

@yyx990803
Copy link
Member

Can you provide a repro using 1.0.0-alpha.2?

@humanismusic
Copy link
Author

Sure thing. Repro created here

@humanismusic
Copy link
Author

Spent more time on this and don't think it's due to the comment issue that affected #437. Looks like comment nodes are not output in the DOM in Vue 1.0.0 when using v-for, as far as I can tell.

So issue is caused by something else that I can't seem to resolve.

@yyx990803
Copy link
Member

Ok, so in 0.12, the anchor nodes for v-repeat will be an empty textNode in normal mode, and comment node in debug mode. So the code that hacks around comment nodes should also check for empty textNodes: http://jsfiddle.net/64scphgn/5/

@humanismusic
Copy link
Author

Thanks for the info however this doesn't resolve the issue. If you walk through the reproduction steps in your updated Fiddle the 'Cannot read property '__vfrag__' of null error still appears.

Note that this only happens after dragging between two lists like in example, dragging within a list appears to be OK. Any ideas?

yyx990803 pushed a commit that referenced this issue Sep 10, 2015
Cater for scenario where there is no previous sibling of el. Solution to #1249 and similar to #982. Occurs in scenario where dragging between lists using a library such as RubaXa Sortable.
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