-
17 Sep 2012 4:26 AM #1
Window constrain:true inside another window, restoring position problem
Window constrain:true inside another window, restoring position problem
Tested in Extjs 4.1.1 and 4.1.2, IE9 and Chrome.
Window "constrain:true" inside another main window, a problem restoring its previous position after restore main window.
Steps to reproduce:
1- Take the window.js example (extjs examples/window)
2- Put "maximizable:true," to the win2 window.
3- Open the example in the browser
4- Maximize win2
5- Move one window inside it to the left
6- Restore win2
The window inside win2 doesn't restore your position correctly.
This is a bug?
Thankyou
Testcase:
Code:var constrainedWin; var win2 = Ext.create('widget.window', { height: 200, width: 400, x: 450, maximizable:true, y: 450, title: 'win2', closable: false, plain: true, layout: 'fit', items: [ constrainedWin = Ext.create('Ext.Window', { title: 'Constrained Window', width: 200, height: 100, x: 1000, y: 20, constrain: true, layout: 'fit', items: { border : false, html : 'After maximizing win2, move me outside where it will be outside win2 and then restore win2' } }), { border: false } ] }); win2.show(); constrainedWin.show();Last edited by mitchellsimoens; 17 Sep 2012 at 6:20 AM. Reason: added trimmed down testcase
-
17 Sep 2012 6:20 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
Moved to the bugs forum, attached a simpler testcase and I have opened a bug in our bug tracker.
-
17 Sep 2012 8:51 AM #3
please, let me know if there is a temporary fix, thank you
-
20 Sep 2012 4:53 AM #4
I found a solution. When I add a window to the main window, I save it in a array "dashWindow" so after restore, I run "doConstrain" for each window.
In the Main window:
My fix works with Extjs 4.1.2Code:dashWindows:[], //store the child windows listeners:{ restore:{ fn: function(win){ Ext.each(me.dashWindows, function(w){ w.doConstrain(); }); } } },

Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7262
in
4.2.1.


Reply With Quote