Opened 8 years ago

Last modified 8 years ago

#18048 closed defect

dojox/mobile/Switch: templating broken — at Version 1

Reported by: Adrian Vasiliu Owned by:
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 Adrian Vasiliu)

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() ( and later moved inside resize() ( ). Both variants of the code break the templating of the Switch.

The failure is because makes the blind assumption that the first child of this.left can be styled, which is not necessarily the case with a template.

Change History (1)

comment:1 Changed 8 years ago by Adrian Vasiliu

Description: modified (diff)
Note: See TracTickets for help on using tickets.