Opened 12 years ago
Closed 12 years ago
#8454 closed defect (worksforme)
_LayoutWidget not always resizing properly
Reported by: | Mike Wilcox | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.2.3 |
Keywords: | _LayoutWidget BorderContainer | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
This condition occurs when the top-most parent widget of a BorderConatiner is the size of the page. I assume that the calculations done are based on the fact that the parent may be in a div or a table, and not taking up the whole page.
While the whole-page situation does not fail; it does not update properly, and looks like it is checking for width change and not a height change.
The bug witnessed happens when resizing the page to it's minWidth (non-IE case) and then resizing it up and down. Because the width doesn't change, the resize is not triggered.
Here is the code I used in our app to over-ride this behavior:
dijit.layout._LayoutWidget.prototype._resize = dijit.layout._LayoutWidget.prototype.resize; dijit.layout._LayoutWidget.prototype.resize = function(changeSize, resultSize){ // in our case this is the parent if(this.id=="layoutNode"){ changeSize = dijit.getViewport(); } this._resize(changeSize, resultSize); }
After this fix, the resize works very smoothly.
I don't know the mechanism of the BorderContainer well enough to know if the above example is reasonable or not. I suggest possibly a property along the lines of: isWholePage
Change History (4)
comment:1 Changed 12 years ago by
Owner: | changed from wildbill to bill |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
I tried the mail demo on FF3/mac and resizing vertically is working fine, even when the browser is set to the min-width. So please supply a test case or I'll have to close this as "worksforme". Thanks.
comment:3 Changed 12 years ago by
Sorry for the long time between replies, and for not giving a test case right off the bat. Our situation is a complex AIR application, so the test case would not be easy to put together.
However, I looked at the dijit tests and test_BorderContainer_full.html emulates our situation quite well. And after testing it in Safari, I found that it worked perfectly.
Go ahead and mark this worksforme. I am satisfied to have a record of the problem and a solution posted if someone else runs into this apparent edge case.
comment:4 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
OK, thanks. If you get a test case let me know.
Can you give a test case to reproduce this? Does it happen on the mail demo or themeTester.html? Which browser(s) does it occur on?