Results 1 to 10 of 10

Thread: [2.0.2][DUP] MessageBox does not hide correctly

  1. #1
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default [2.0.2][DUP] MessageBox does not hide correctly

    Hi,

    I noticed (via the samples and code I've tested) that the messagebox will ignore a hide when the window is being dragged (moved). In other words, if you drag/move a messagebox window and the call to hide is sent, then it ignores it and you cannot continue (as the windows has been blocked/masked).

    Cheers,
    Grant

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    Perhaps this is by design, and if so, how can you ensure the user has not locked themselves out of your application/site due to the messagebox mask and therefore disabling all other controls... I'm wondering if there is a way you can disable the window move/resize actions to ensure this event blocking does not occur.

  3. #3
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    I believe what you are describing is by design. For clarity could you please post a code sample so that we can all be on the same page?
    Aaron Conran
    @aconran

  4. #4
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Talking Sample demonstrates

    There is no real need to provide code as your samples on the website show the problem on all messageboxes easily..

    http://extjs.com/deploy/dev/examples...x/msg-box.html

    For example, click Show on the Progress Dialog. As it is about to end (nearing 100% on the progress bar) click, and hold the title of the Messagebox - you can even move it about, but it doesn't mater if you do or don't - as long as you keep hold of the title (like a mouse-drag)

    Once you have waited past the timeout, when you release the title bar you won't be able to continue with that page... its is locked out and sitting at 100%.

    This is a bad design decision as it would leave a user in a state unable to continue with your application. Not a bug in code, but a bug in design.

    Does ExtJS have an event-queue ? If so, then this close/hide call should be queued until the widget can handle the event, and then close itself after handling the current move events that are blocking.

    Cheers,
    Grant

  5. #5
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    Quote Originally Posted by aconran View Post
    could you please post a code sample ...
    Oh, happy to provide a code sample - just tell me what I need to provide that would be different from the existing Samples on the ExtJS website - otherwise use the code in those samples to demonstrate the bug...!!

  6. #6

    Default What I need for this bug.(Ext.MessageBox.hide)

    It is fixed in ExtJs1.1(http://extjs.com/deploy/ext-1.1.1/ex...g/msg-box.html) . But this bug is in the extjs2 (http://extjs.com/deploy/dev/examples...x/msg-box.html). so i need the fix for this bug. Coz the user will be dragged the wait screen, while it will not dismissed and the user won't be able to continue with that page.

    Cheers,
    Riyaz

  7. #7
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193

    Wink Patch and/or workaround hidding MessageBox while dragging

    Hi all

    This is a patch/workaround to can hide a message box while is dragging .
    The basics on the patch is calling Ext.dd.DragDropMgr.stopDrag() on the method hide at MessageBox:
    Code:
    ..............
    hide : function(){
        Ext.dd.DragDropMgr.stopDrag(); //PATCH call stopdrag
        if(this.isVisible()){
            dlg.hide();
            handleHide();
        }
        return this;
    },
    ..............
    But as a workaround, you can't override this function because hide is accessing private variable(dlg) and functions (handleHide) .
    So, you can use this next as a workaround (forever or until this patch or some other solution is included into the official code ).
    This workaround consists in creating an interceptor doing the work on the hide function:
    Code:
    Ext.onReady({
    .............
        Ext.apply(Ext.MessageBox,{
            hide: Ext.MessageBox.hide.createInterceptor(function(){
                Ext.dd.DragDropMgr.stopDrag();
            })
        });
    ................
    });
    Hope this can help you...
    Regards

  8. #8

    Default Re : Patch and/or workaround hidding MessageBox while dragging

    HI halkon_polako,

    Thanks for this reply. It is working. Once again thanks.

    I have used following code.
    Code:
    Ext.apply(Ext.MessageBox,{
            hide: Ext.MessageBox.hide.createInterceptor(function(){
                Ext.dd.DragDropMgr.stopDrag();
            })
        });
    Cheers,
    Riyaz.
    Last edited by mystix; 30 Mar 2008 at 10:14 PM. Reason: use [code][/code] tags

  9. #9
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    4

    Default

    This was reported previously and is still on our list to fix. The proper fix needs to be done in Window and is a little trickier than the patches posted above.

  10. #10
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193

    Default

    Quote Originally Posted by brian.moeskau View Post
    This was reported previously and is still on our list to fix. The proper fix needs to be done in Window and is a little trickier than the patches posted above.
    Yes... you are right.... it is more a fix on Window than MessageBox, but meanwhile....

Posting Permissions

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