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

Mustache - TypeError: Cannot read property 'childNodes' of null #425

Closed
sporto opened this Issue Jun 11, 2013 · 4 comments

Comments

Projects
None yet
4 participants
@sporto
Contributor

sporto commented Jun 11, 2013

This seems to be a bug

See
http://jsbin.com/ilinax/1/edit

This throws TypeError: Cannot read property 'childNodes' of null

If you remove this piece of code:

   {{#state.loading}}
        Loading
   {{/state.loading}}

It works.

If you remove the table it works.

But the combination of the two blocks throws.

@sporto

This comment has been minimized.

Show comment
Hide comment
@sporto

sporto Jun 11, 2013

Contributor

Another example
http://jsbin.com/unigav/2/

Contributor

sporto commented Jun 11, 2013

Another example
http://jsbin.com/unigav/2/

@sporto

This comment has been minimized.

Show comment
Hide comment
@sporto
Contributor

sporto commented Jun 11, 2013

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jul 18, 2013

Contributor

You need a wrapping element around live text elements. Something like:

<span>
   {{#state.loading}}
        Loading
   {{/state.loading}}
</span>

otherwise, we have no parent element to update the live part relative to. We might be able to fix this by modifying the document fragment temporarily.

Contributor

justinbmeyer commented Jul 18, 2013

You need a wrapping element around live text elements. Something like:

<span>
   {{#state.loading}}
        Loading
   {{/state.loading}}
</span>

otherwise, we have no parent element to update the live part relative to. We might be able to fix this by modifying the document fragment temporarily.

@shcarrico

This comment has been minimized.

Show comment
Hide comment
@shcarrico

shcarrico Apr 15, 2014

Contributor

Should we throw a dev mode warning for this, or try to code a workaround?

Contributor

shcarrico commented Apr 15, 2014

Should we throw a dev mode warning for this, or try to code a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment