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

Functions (when called from a template) are no longer bound to the context #317

Closed
tysonmote opened this issue Sep 19, 2012 · 2 comments · Fixed by SlexAxton/require-handlebars-plugin#67

Comments

@tysonmote
Copy link
Contributor

Here's a minimal example: http://jsfiddle.net/vStL4/
And here's an example of it working properly in 1.0.0.beta.6: http://jsfiddle.net/5WkXe/

I expect the behavior to be similar to that in 1.0.0.beta.6, but instead functions on the context that are called from the template are no longer bound to the context.

tysonmote pushed a commit to stvp/handlebars.js that referenced this issue Sep 19, 2012
The regression was introduced in 1.0.rc.1.

This fixes issue handlebars-lang#317.
@pixeltrix
Copy link

Pretry sure I'm see this also - the following temple renders a Backbone.js model:

{{#with notice}}
<div id="notice_{{id}}" class="notice" style="opacity: 0;">
{{{message}}}
<button class="close" title="Don't show this message again">&times;</button>
</div>
{{/with}}

works fine in 1.0.beta6 but fails in 1.0.rc1.

@wycats
Copy link
Collaborator

wycats commented Oct 10, 2012

Fixed

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

Successfully merging a pull request may close this issue.

3 participants