Results 1 to 3 of 3

Thread: Constrained, maximized window in panel body act strange on browser resize

  1. #1
    Ext User
    Join Date
    Mar 2009
    Location
    Switzerland
    Posts
    26

    Default Constrained, maximized window in panel body act strange on browser resize

    My app has begun to behave slightly weird after upgrading to 3.0, but it's annoying enough for me to take the time to write a thread about it :P

    I create a constrained window, rendered inside a panel body. Thereason for putting it in a panel body is that the panel would have a bottom and top toolbar with menus etc, to get that MDI-style feeling. If I maximize the window, I do not want these toolbars to be covered by the window.

    However, since upgrading to 3.0, the window doesn't resize correctly when maximized, and the browser window is resized. This is most obvious when you do the following:
    - Maximize the constrained window
    - Restore the browser window
    - Maximize the browser window

    The constrained window is either not resized at all, or resized badly, as if the resize event that the window listens to was to early or to late. I have tested this in FF3.5 and IE8.

    Here is some code that demonstrates this behaviour:

    Code:
            Ext.onReady(function() {
                var testPanel = new Ext.Panel({
                    listeners: { 'render': function() {
                        new Ext.Window({
                            title: 'Test window not resizing correctly when browser is resized (when maximized)',
                            html: 'Test Content',
                            maximizable: true,
                            constrainHeader: true,
                            renderTo: testPanel.body
                        }).show();
                        
                        new Ext.Window({
                            title: 'Test window resizing correctly when maximized(in document body)',
                            html: 'Test Content',
                            maximizable: true,
                        }).show();
                    } }
                });
    
                new Ext.Viewport({
                    layout: 'fit',
                    items: [testPanel]
                });
            });
    Anyways... I am guessing I am doing something wrong here, that worked in 2.2 but was wrong still . If it's an error, the error obviously lies in
    Code:
    renderTo: testPanel.body
    Thus my question; is there another way of achieving this... that works? I am thankful for any suggestions.

    Video link: http://www.screencast.com/users/Tewr...1-65c5f6ba719a
    Last edited by Tewr; 7 Aug 2009 at 1:27 AM. Reason: Added video link

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    9

    Default

    I have the very same problem here. Did you find a solution for this?

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    I can't look into it right now, but I suspect a problem with Ext.EventManager's window resize system which fires the event on a delay.

    If you programatically call fitParent (which is what the Window class does on browser window resize), its jumps to the correct size. So I think the code in the Window class is correct. It's the underlying platform that's got a problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •