Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#18012 closed defect (fixed)

SpinWheelSlot.resize() badly assumes the widget is fully initalized

Reported by: Patrick Ruzand Owned by: Patrick Ruzand <pruzand@…>
Priority: undecided Milestone: 1.10
Component: DojoX Mobile Version: 1.10.0-beta1
Keywords: Cc:
Blocked By: Blocking:

Description

The SpinWheelSlot?.resize() method badly assumes the widget is fully initalized. The SpinWheelSlot?.resize() method is called indirectly from within buildRendering() when the latter sets the widget containerNode height. This result under IE in a resize event that is immediatly dispatched and received by dojox.mobile.resizeAll, resulting in calling the widget resize() method.

Only reproduced under IE8. To reproduce: run dojox/mobile/tests/test_SpinWheelDatePicker-setter.html.

This could potentially affects other platforms, depending on when exactly the resize event is dispatched.

This problem appeared in 1.9.x due to #16996 (https://github.com/dojo/dojox/commit/3aa73c77897b3e0f416c941c227e8f70de617e94)

Change History (4)

comment:1 Changed 6 years ago by Patrick Ruzand <pruzand@…>

Owner: set to Patrick Ruzand <pruzand@…>
Resolution: fixed
Status: newclosed

In 4ce0fa0794929282b87857d3d059491796c5cc40/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:2 Changed 6 years ago by Patrick Ruzand

Milestone: tbd1.10

comment:3 Changed 6 years ago by Adrian Vasiliu <vasiliu@…>

In 174cc8d076f2fd5461a51238fbfd86a6b7a4d6c5/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 6 years ago by Adrian Vasiliu

Added a further protection against NPE in resize() due to this.getParent() being null in some conditions. The NPE can be reproduced with Dojo 1.10b1 by running dojox/mobile/tests/doh/spinwheel/runTests.html in "break on error" mode in IE8 and IE9 / Win7. In this case, the resize() method gets called *after* the end of the run of the DOH test, due to the listener installed by dojox/mobile/common which calls common.resizeAll().

A proper tearDown of the DOH tests might avoid it, however to be on the safe side I added a protection in the code.

Note: See TracTickets for help on using tickets.