Ticket #4501 (new defect)
Widgets cannot be root of templates
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3 |
| Component: | Dijit | Version: | 0.9 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
HOW TO REPRODUCE:
Click on: http://82.230.65.68:31416/~fred/dojo/fred_samples/bug_004.html
RESULT:
A web page that displays a normal html button and a tundra button
EXPECTED RESULT:
Both buttons should be tundra styled
REASON:
The first button is constructed by a widget which have the following templateString:"<button dojoType="dijit.form.Button">Button 1</button>". The dojoType fragment is ignored because it is at the root of the hierarchy.
The bug is here reproduced with a button as the root of the template, which is an uncommon occurence, but it also prevents having Layout or ContentPane? as the top level of the template, which is IMO much more serious.
At minimum the "widgetsInTemplate:true" code should raise an error if the top-level element have a dojoType attribute.