Opened 11 years ago
Closed 11 years ago
#10403 closed defect (invalid)
BorderContainer: too much recursion
Reported by: | Dipl.Ing. (FH) Christian K. Fraunholz | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.4.0b |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
in dojo version 1.4 the following code causes an endless loop ("too much recursiono error message in firebug"):
var bc = new dijit.layout.BorderContainer({ id: tabName, gutters: false, liveSplitters: false }); var grid = new sparepart.widget.DeviceGroupGrid({ context: mySelection });
The error disappears when setting gutters to true or disabling the grid mixin that overrides the adaptHeight method of the grid. The code worked fine in dojo version 1.3
Attachments (2)
Change History (5)
comment:1 Changed 11 years ago by
Component: | General → Dijit |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Summary: | too much recursion → BorderContainer: too much recursion |
comment:2 Changed 11 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I am seeing the "too much recursion" error with a DataGrid inside a BorderContainer inside a dojox Dialog. I have attached a test case. Oddly enough, there are several conditions which I found have to be true in order for the error to happen:
- gutters must be "false" on the BorderContainer: setting to "true" makes it work fine.
- The BorderContainer's height must be 100%: setting to a pixel height makes it work fine.
- There must be a top region ContentPane in the BorderContainer, and that ContentPane must not be empty: if the top region ContentPane contains nothing or if there isn't a top region, everything works fine.
- dijit.Dialog works fine
The endless loop appears to come from the adaptHeight() method in _View.js of the DataGrid, which calls hasHScrollbar(), which calls this.grid.update(), which starts the whole thing over again. It seems weird that an inspector method called hasHScrollbar() would call an action method update(), but I'm sure it was done for a reason.
tested in FF 3.6.3 with Dojo 1.4.3
Changed 11 years ago by
Attachment: | dataGrid_borderContainer_bug.html added |
---|
comment:3 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
I do see the hang in dgreene's testcase although it's being caused because the BorderContainer doesn't has a height/width set. I added style="height:300px; width: 300px;
and then the test works correctly, with no hang.
Perhaps that was the problem in the original ticket also.
When I traced things in firebug the second ContentPane ended up calling grid.resize({h: 1, w: 1}) and then the browser hung. Not sure why, but anyway the lack of size specification is the error in the test file.
Please attach test cases using the attach file button. I tried making a test case out of the code you attached above and it worked fine.
Also, does the failure have anything to do with your sparepart.widget.DeviceGroupGrid? widget? If so you need to add that to your test case.