Opened 11 years ago

Closed 11 years ago

#7661 closed defect (fixed)

[patch] [cla] BorderContainer: creates infinite loop in _layoutChildren

Reported by: Shane O'Sullivan Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Dijit Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:

Description

The dijit.layout.BorderContainer? widget has handling to check if it's splitters are more than 50 pixels wide/high. If the are, the _layoutChildren function calls itself again after a delay.

However, this will always go into an infinite loop, as the values it is calculating, the 'leftSplitterThickness' and 'rightSplitterThickness' are not recalculated. The widget will then not layout correctly.

I am attaching a one line change to fix this issue.

Attachments (1)

BorderContainer_inifiniteLoopInLayout.patch (531 bytes) - added by Shane O'Sullivan 11 years ago.
patch to fix this issue

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Shane O'Sullivan

patch to fix this issue

comment:1 Changed 11 years ago by bill

Summary: BorderContainer creates infinite loop in _layoutChildren[patch] [cla] BorderContainer: creates infinite loop in _layoutChildren

comment:2 Changed 11 years ago by Adam Peller

Milestone: 1.2
Owner: set to Adam Peller
Status: newassigned

Shane, I'm not sure I understand why there would be an infinite loop or how this code would help. Can you demonstrate the bug?

comment:3 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [15249]) Thanks, Shane for noticing this. The optimization to _computeSplitterThickness no longer recalcs if the value is truthy, so reset the this._splitterThickness hash for the race condition. Fixes #7661. !strict

Note: See TracTickets for help on using tickets.