1. #1
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default 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 :)

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    685
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you please put together a small test case so we are looking at the same issue?

    Scott.

  3. #3
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default


    Here you go.

    PHP Code:
    Ext.require([
        
    'Ext.window.*',
    ]);

    Ext.create(function() {
        var 
    win1 Ext.create('Ext.window.Window', {
            
    title'Window1',
            
    width400,
            
    height400,
        });
        var 
    btn Ext.create('Ext.button.Button', {
            
    text'click me',
            
    handler: function() {
                var 
    win2 Ext.create('Ext.window.Window', {
                    
    title'Window2',
                    
    width200,
                    
    height200,
                });
                
    win1.add(win2);
                
    win2.show();
            },
        });
        
    win1.add(btn);
        
    win1.show();
    });
    ​ 
    or http://jsfiddle.net/metalinspired/LZqFF/

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    685
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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.

  5. #5
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default


    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.

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    685
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you just make a modal window?

    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();
    });  ​
    Scott.

  7. #7
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1

Tags for this Thread