Results 1 to 6 of 6

Thread: Popup window going outside of main window on resize.

  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    64
    Answers
    2

    Default Popup window going outside of main window on resize.

    Maximize.jpgResize.PNG

    Hi,

    Above are two window where popup is opening correctly when window is maximized.. But when window is resized popup is moving out of window... What might be the issue??

  2. #2
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    716
    Answers
    45

    Default

    Without some code posted its hard to help you.
    First thoughts - the popup window are you using the constrainTo config?

    See http://docs-origin.sencha.com/extjs/4.2.2/#!/example/window/window.html

    L
    ook at the constrained window example

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    64
    Answers
    2

    Default

    I have tried with constrainTo config.. However my actual problem is, suppose popup window width is 400 and window size is resized to less then 400 then Popup wont display..
    Below is code for popup..


    Code:
    Ext.define('CorrGen.view.AttachmentDescriptionView', {
        extend: 'Ext.window.Window',
        alias : 'widget.attachmentDescriptionView',
    
        title : 'Additional Description1(50 characters max)',
        layout: 'fit',
        autoShow: true,
        id: 'rejectReasonWindow',
        border: 0,
        height: 90,
        width: 400,
        resizable: false,
        modal: true,
        closable: false,
        constrainTo: true,
    
        initComponent: function() {
    
            var required = '<span style="color:red;font-weight:bold" data-qtip="Required"> * </span>';
            this.items = [
                {
                    xtype: 'form',
                    items: [
                        {
                            xtype     : 'textfield',
                            grow      : true,
                            maxLength:50,
                            enforceMaxLength:true,
                            width: 380,
                            name: 'attachmentDesc',
                            id: 'attachmentDesc',
                            flex: 1,
                            padding: '2, 2, 2, 5'
                        }
                    ]
                }
            ];
    
            this.buttons = [
    
                {
                    text: 'Cancel',
                    scope: this,
                    handler: this.close,
                    icon : Farmers.commons.ImageURLs.ICON_REDX
                },
                {
                    xtype: 'tbfill'
                },
                {
                    text: 'OK',
                    action: 'addDesc',
                    icon : Farmers.commons.ImageURLs.ACCEPT_IMG
                }
            ];
    
            this.callParent(arguments);
        }
    });

  4. #4
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    716
    Answers
    45

    Default

    Have a look at the x and y config - by default window should center on the container its rendered to.
    Check what you are rendering the window to - probably by default the view port with a show.
    Try rendering it to the container

  5. #5
    Sencha User
    Join Date
    May 2013
    Posts
    64
    Answers
    2

    Default

    Could not get much on it.. can you please elaborate on the same???

  6. #6
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    The correct option is constrain:true, not constrainTo.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


Posting Permissions

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