sproutcore/sproutcore20 — Issue #204: First {{bindAttr}} in a template is bound to wrong element
Author: garth
Created: 2011-11-13 00:43:28+00:00
State: open

The following handlebars template

One

Two

Three

produces the following html

One

Two

Three

This almost looks ok, except that handlebars has generated a div container for the template and the viewState.tabOneClasses is bound to the class attribute of the container rather than the first li so as viewState.tabOneClasses updates the class of the container updates instead of the first li which always keeps its initial render state.

As a workaround I have to add an extra hidden div with a {{bindAttr class="viewState.tabOneClasses"}} at the beginning of the template, then all the visible items and their bindings function ok, but then I have extra dom elements hanging around.

I'm currently running against the latest master branch (b45b546b3a21562eda9536d5cc58d2d9b9aa06cc), but have experienced the same issue with the official beta 3 also.