Opened 8 years ago
Last modified 8 years ago
#18048 closed defect
dojox/mobile/Switch: templating broken — at Version 4
Reported by: | Adrian Vasiliu | Owned by: | Sebastien Pereira |
---|---|---|---|
Priority: | undecided | Milestone: | 1.10 |
Component: | DojoX Mobile | Version: | 1.10.0-beta1 |
Keywords: | Cc: | bill, Patrick Ruzand | |
Blocked By: | Blocking: |
Description (last modified by )
dojox/mobile/Switch is broken in the (optional) templated use-case.
How to reproduce: load dojox/mobile/tests/test_Templated-widgets.html in any browser: most of the time (not always, in particular on mobile devices), the layout of the page is broken and the console shows: parse() error, "Cannot set property 'width' of undefined"
This is a consequence of the new code introduced in Switch.js for #15076, more precisely the code introduced initially inside postCreate() (https://github.com/dojo/dojox/commit/5abd3a3fd5c8fc7237096a2d16bb38b45d5a526e) and later moved inside resize() (https://github.com/dojo/dojox/commit/5cfae8a68a6948baef4714cb36e068816efc7d88 ). Both variants of the code break the templating of the Switch.
The failure is because https://github.com/dojo/dojox/blob/master/mobile/Switch.js#L148 makes the blind assumption that the first child of this.left can be styled, which is not necessarily the case with a template. I have verified that the issue still hurts if test_Templated-widgets.html is modified to use manual parsing instead of parseOnLoad:true.
Change History (4)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 8 years ago by
Owner: | set to Sebastien Pereira |
---|---|
Status: | new → assigned |
comment:3 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 8 years ago by
Description: | modified (diff) |
---|