Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    87
    Vote Rating
    3
    esag_dk is on a distinguished road

      0  

    Default ConfirmMessageBox - many bugs

    ConfirmMessageBox - many bugs


    Version(s) of Ext GWT
    Ext GWT 3.0 Final

    Browser versions and OS (and desktop environment, if applicable)
    IE 9 Windows 7

    Virtual Machine
    No

    Description
    The ConfirmMessageBox (and probably other related dialogs) doesn't work properly:
    1. setOnEsc(true) doesn't hide the dialog after pressing escape
    2. focusing one of the buttons doesn't work (or maybe I am missing something?). I'm used to see a dialog with a predefined focused button, so I only type return to execute it.
    2. setModal(true) doesn't make the dialog really modal. see my example below (with the commented out setFocusWidget line). click on the button, the dialog opens. now type return. since the button is still selected in the background, the dialog opens one more time (you have to close it twice or as many times as you pressed return). you can click somewhere on the rootpanel and the button selection disappears. you can also use the setfocuswidget line. it solves that problem (as a workaround ofc), but still doesn't focus a dialog button (problem #2)

    Run mode
    Development Mode

    Test case

    Code:
       public void onModuleLoad()
        {
            TextButton button = new TextButton("open dialog!");
            button.addSelectHandler(new SelectHandler()
            {
    
                @Override
                public void onSelect(SelectEvent event)
                {
                    ConfirmMessageBox box = new ConfirmMessageBox("title", "y u no blur?");
                    box.setModal(true);
                    box.setOnEsc(true);
    //                box.setFocusWidget(box.getItemByItemId(box.getPredefinedButtons().get(0).name()));
                    box.show();
                }
            });
            RootPanel.get().add(button);
    }

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    Thanks for the detailed report. I've filed your collection of issues as EXTGWT-2148, EXTGWT-2149, EXTGWT-2150, and EXTGWT-2152. We'll post updates to this thread if any of those issues are addressed.

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    The primary bug was that buttons were not focusable programmatically. This bug has been fixed. You can see the updated code here http://staging.sencha.com:8080/examp...lePlace:dialog. You will also notice the escape key will dismiss the window. This works now as the window, or a child widget, has focus.

    The modal issue is now resolved as focus moves from the button opening the window to the window. I tested with the code you provided and it works fine.

    One note is that box.setOnEsc(true); only works when the window is closable which is not the case by default message boxes. This makes sense as the user must select one of the buttons to dismiss the window. You can setClosable to true to change this behavior.

    The fix will go out in the next release (3.0.2).

Thread Participants: 2