leonidas / transparency

Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
http://leonidas.github.com/transparency/
MIT License
969 stars 112 forks source link

Rendering multiple select elements with same data doesn't set selected correctly on Firefox #94

Closed nnarhinen closed 11 years ago

nnarhinen commented 11 years ago

Demonstration of the issue: http://jsfiddle.net/3VHfS/

On chrome the values are set correctly (first, second, third, fourth, fifth)

On firefox the selected values presented are first, first, first, first, fifth

pyykkis commented 11 years ago

It turned out that all option elements needs to appended to select element before setting any of them selected.

Changed transparency.js to create all needed elements before setting any values.