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

safari error with template and v-repeat #484

Closed
pkat opened this issue Oct 14, 2014 · 8 comments
Closed

safari error with template and v-repeat #484

pkat opened this issue Oct 14, 2014 · 8 comments

Comments

@pkat
Copy link

pkat commented Oct 14, 2014

First, thanks for this great library!

In Safari (7.1), i'm getting this error

TypeError: null is not an object (evaluating 'this.$el.__vue__ = this')

when using template with v-repeat

<template v-repeat="arrayOfObjects">
   <div>...content a...</div>
   <div>...content b...</div>
</template>

It appears to be working fine in Chrome and Firefox. I'm running 0.11.0-rc2

@yyx990803
Copy link
Member

I can't seem to reproduce this. Can you make a jsfiddle?

@pkat
Copy link
Author

pkat commented Oct 14, 2014

Sure, here it is: http://jsfiddle.net/40yppdLg/1/

I'm able to see the iteration of v-repeat rendered in latest Chrome, Firefox and IE11. However in Safari, i'm getting the error.

@yyx990803
Copy link
Member

This is actually caused by a nasty bug in Safari: http://jsfiddle.net/3s73zgjn/
It's pretty tricky to fix on Vue's side since Vue relies on cloneNode() a lot internally. Not sure if they will fix this any time soon...

In the meanwhile my suggestion is use a wrapper div instead of a template for now, I'll see how the webkit team reacts to the bug report.

@pkat
Copy link
Author

pkat commented Oct 15, 2014

Interesting. Thanks for looking into it!

@yyx990803
Copy link
Member

Ok, it's now worked-around in the next branch. Hope they fix it soon...

@dwightjack
Copy link

Hi just as a follow up
I think I'm experiencing the same issue with iOS Safari and on latest safari on Mac.
Here is a jsbin:
http://jsbin.com/kodeyi/edit?html,css,js,output

Since this seems still an issue, wouldn't be useful to place a warn on the docs until Apple fixes the bug?

@yyx990803
Copy link
Member

@dwightjack the jsbin seems to work fine for me in Safari 8.

@dwightjack
Copy link

You're right!
Looks like our problem is related to something else. Sorry!

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

3 participants