Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14435 closed defect (fixed)

dojox/mobile/scrollable race condition for flashScrollBar called from init

Reported by: ben hockey Owned by: ykami
Priority: high Milestone: 1.7.1
Component: DojoX Mobile Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description

in init for dojox/mobile/scrollable, there is a timeout of 600ms to call flashScrollBar. if the widget happens to be destroyed before this timeout, there will be an error when getDim (called by flashScrollBar) tries to get the offsetHeight of the non-existant domNode.

see http://jsfiddle.net/neonstalwart/vAfK4/ for an example. clicking on the list destroys the list and rebuilds it. if you click twice (within 600ms) you'll see the error in the console.

Change History (3)

comment:1 Changed 8 years ago by ykami

Milestone: 1.7.1
Status: newassigned

Thank you for the report. I believe just checking this.domNode in flashScrollBar() should be fine. I'll back-port this to 1.7 as well since the fix is only one line and 100% safe.

comment:2 Changed 8 years ago by ykami

Resolution: fixed
Status: assignedclosed

In [27370]:

Fixes #14277, #14435 !strict Checks this.domNode in flashScrollBar(). It may not be available if the widget is destroyed immediately after its creation.

comment:3 Changed 8 years ago by ykami

In [27369]:

Fixes #14277, #14435 !strict Checks this.domNode in flashScrollBar(). It may not be available if the widget is destroyed immediately after its creation.

Note: See TracTickets for help on using tickets.