Results 1 to 8 of 8

Thread: Extjs 6: modal window is not vertically aligned in the middle of the current view

  1. #1
    Sencha User nareshkokkula's Avatar
    Join Date
    Feb 2012
    Posts
    48
    Answers
    1
    Vote Rating
    -2
      1  

    Default Extjs 6: modal window is not vertically aligned in the middle of the current view

    hi,

    We have upgraded to sencha from 4.2 to 6.2.1. Currenlty I have seen an issue which I can reproduce using sencha fiddle.
    I have configured a button to open a window on its click and kept this button at the bottom of the form which has many controls.

    Action:
    scroll down the form to reach the button and click the button.
    form will be masked but the window will not be seen in current view.
    window can be seen once we scroll the form to top.



    Please let me know if anyone encountered the same with latest extjs library.
    Suggestions are much appreciated.

    thanks,
    Naresh

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64
    Vote Rating
    33
      0  

    Default

    Setting window's constrain config to true seems to help..

  3. #3
    Sencha User nareshkokkula's Avatar
    Join Date
    Feb 2012
    Posts
    48
    Answers
    1
    Vote Rating
    -2
      0  

    Default

    thanks Chramer that helped, but still it is aligned on top left corner instead of aligned in the middle.

  4. #4
    Sencha User nareshkokkula's Avatar
    Join Date
    Feb 2012
    Posts
    48
    Answers
    1
    Vote Rating
    -2
      0  

    Default

    here is the sencha fiddle link
    https://fiddle.sencha.com/#fiddle/1n8b&view/editor,
    popup is aligned on top.

  5. #5
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64
    Vote Rating
    33
      0  

    Default

    It seems that when "constrain" is set to true, the window ignores the "defaultAlign" config. I don't know why this happens. Maybe someone else has a deeper understanding of what is going on here..
    Last edited by chramer; 2 Jan 2017 at 2:26 AM. Reason: corrected the config link

  6. #6
    Sencha User
    Join Date
    Jul 2008
    Location
    Paris
    Posts
    21
    Answers
    2
    Vote Rating
    1
      0  

    Default

    Same issue... Simple but I am wasting time finding solutions ! Did you found a solution ?

  7. #7
    Sencha User
    Join Date
    Feb 2017
    Location
    Texas, USA
    Posts
    2
    Vote Rating
    0
      0  

    Default

    I have the same issue. It seems Ext is calculation the placement based on the total page height instead of visible height. Because of this, I stayed at 6.0.2

  8. #8
    Sencha User
    Join Date
    Feb 2017
    Location
    Texas, USA
    Posts
    2
    Vote Rating
    0
      0  

    Default

    quick workaround:

    add listeners to your created window

    listeners : {
    show : function (window, eOpts) {
    window.alignTo(document.body, 'c-c', [document.body.scrollLeft, document.body.scrollTop]);
    },
    }

Similar Threads

  1. Replies: 1
    Last Post: 28 Jan 2016, 2:39 PM
  2. Replies: 1
    Last Post: 5 Aug 2013, 10:23 PM
  3. Vertically aligning items in the middle on a panel
    By miraclemaker in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 13 Jan 2013, 11:45 AM
  4. 4 buttons aligned vertically
    By karstenvennemann in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 10 Feb 2009, 2:24 PM
  5. Replies: 4
    Last Post: 8 Jul 2008, 6:41 AM

Tags for this Thread

Posting Permissions

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