dojo / dojox

Dojo 1 - extras library. Please submit bugs to https://bugs.dojotoolkit.org/
https://dojotoolkit.org/
Other
150 stars 231 forks source link

The value attribute of option tag does not render properly #295

Closed lhcopetti closed 5 years ago

lhcopetti commented 5 years ago

I just noticed a really specific case where the value attribute from an option tag would not be rendered properly.

Problem When you attempt to render an option tag that has the same DTL expression for both its value attribute and innerHTML the value attribute does not get rendered.

Eg:

file.template

<div>
    <select>
        <option value="{{fruit}}">{{fruit}}</option>
    </select>
</div>

context object { fruit : "Fruit" }

result

<div id="Widget_0" widgetid="Widget_0">
    <select><option value="{{fruit}}">Fruit</option></select>
</div>

(notice that the value attribute has not changed)

You can see it live in this fiddle (inspect the elements of the created combo box).