bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

Meteor: inline events don't work in some cases #156

Closed bminer closed 11 years ago

bminer commented 11 years ago

Inline events are bound once an entire template has finished rendering. For isolate regions, however, inline events for elements that did not exist on the initial rendering will not be properly bound. The inline event handlers will fire, but they will not have access to the view locals in which they are defined.

To fix this bug, the Blade runtime should call blade.LiveUpdate.attachEvents as soon as an inline event is found. This is probably cleaner anyway and may eliminate the need to pass inline event handlers to the template's render callback function.