-
12 Oct 2012 2:57 AM #1
Unanswered: constrain set to false but...
Unanswered: constrain set to false but...
Hi all,
Today I encountered a strange behavior with window.
I have a window that opens another window as its child.
I can move child window outside parent window (since constrain is set to false) but when I start resizing child window it is snapping to parent window borders.
Is this a bug or I'm missing something?Last edited by metalinspired; 12 Oct 2012 at 2:58 AM. Reason: Typo :)
-
12 Oct 2012 9:09 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Can you please put together a small test case so we are looking at the same issue?
Scott.
-
12 Oct 2012 10:46 AM #3
Here you go.
or http://jsfiddle.net/metalinspired/LZqFF/PHP Code:Ext.require([
'Ext.window.*',
]);
Ext.create(function() {
var win1 = Ext.create('Ext.window.Window', {
title: 'Window1',
width: 400,
height: 400,
});
var btn = Ext.create('Ext.button.Button', {
text: 'click me',
handler: function() {
var win2 = Ext.create('Ext.window.Window', {
title: 'Window2',
width: 200,
height: 200,
});
win1.add(win2);
win2.show();
},
});
win1.add(btn);
win1.show();
});
-
12 Oct 2012 12:20 PM #4Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
By adding win2 to win1, is your goal to make it topmost window until closed .. like modal?
I am trying to decide if the issue is the resize, or that you can move it outside of parent.
Scott.
-
13 Oct 2012 12:38 AM #5
I want win2 to be child of win1 so it would stay on top of it.
In my code I have a grid in win1 and editing form in win2.
When I open win2 I disable win1 (I didn't do it in snippet but results are same) until user finishes adding/editing a record.
I have no intention of keeping win2 encapsulated in win1, it just suppose to be on top of it as its child.
-
13 Oct 2012 10:46 AM #6Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Can you just make a modal window?
Scott.Code:Ext.create(function() { var win1 = Ext.create('Ext.window.Window', { title: 'Window1', width: 400, height: 400, }); var btn = Ext.create('Ext.button.Button', { text: 'click me', handler: function() { var win2 = Ext.create('Ext.window.Window', { title: 'Window2', width: 200, height: 200, modal: true }).show(); }, }); win1.add(btn); win1.show(); });
-
14 Oct 2012 3:17 AM #7
No, I can not make it modal because user has to have ability to work with other windows while editing record in this one.
Also by using this approach (including disabling parent window) I prevent possibility of user "tabbing" to parent window buttons an possibly opening a same form twice thus creating confusion.


Reply With Quote