Results 1 to 4 of 4

Thread: [Ext 4.1] stateful window

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2008
    Location
    Feuerthalen, Switzerland
    Posts
    30

    Default [Ext 4.1] stateful window

    I have a stateful window which SHOULD be always positioned centered to the viewport on show until the user changes the position of the window manually. In that case the windows position should be saved but not without a action from the user.

    In ExtJs3 this was the default behavior of stateful windows - the state was only saved after the user changed something.
    In Ext4.1 the state is saved after the window is shown, no matter if the user changed the position or size of the window. This is bad because if the window shows again in another viewport-size (e.g. firebug opened - which is MY daily case) the window should be centered again in the CURRENT viewport size and not appear at the centered position relative to the LAST viewport size (or the size of the viewport when the window was first shown).

    I'm using a cookieStateProvider and I did not find a config-property (whether in the manager nor in the provider or the window itself) to change this behavior to the way it was in Ext3.
    Is there a easy way or do I have to disable stateful on this window hand handle the states manually with event listeners?

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

    Default

    Hmmm, it seems that move event is fired also w/o user actually moving the window. Can you verify that? If it is so I'm prone to say that it is a bug.
    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


  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2008
    Location
    Feuerthalen, Switzerland
    Posts
    30

    Default

    Yes, the events are fired in this order:
    1. staterestore
    2. beforerender
    3. afterrender
    4. move
    5. resize
    6. show
    7. statesave

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

    Default

    I think it is a bug, or at least an unwanted feature, because move and resize shouldn't be fired as a part of initial instantiation and rendering.

    Moving this thread to Bugs so that developer can either fix it or explain the rationale behind it.
    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
  •