1. #1
    Ext User
    Join Date
    Oct 2008
    Posts
    9
    Vote Rating
    0
    throttle is on a distinguished road

      0  

    Default Strange behaviour with modal windows and viewport

    Strange behaviour with modal windows and viewport


    I'm writing an application with GXT 1.1.1 libraries and i need to open some modal windows, but i'm obtaining different behaviours in Firefox 3.0 and IE 7 (dunno if it's a bug of some kind).
    I've got a viewport with the main application and i want to open a modal window then i want to be able to open another modal window from the last one.
    I've been able to recreate the behaviour i'm experiencing with this sample application
    Code:
    package Test.client;
    
    import com.extjs.gxt.ui.client.event.BaseEvent;
    import com.extjs.gxt.ui.client.event.ComponentEvent;
    import com.extjs.gxt.ui.client.event.SelectionListener;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.Window;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class ModalTest extends LayoutContainer implements EntryPoint {
        
        public void onModuleLoad() {
            Viewport view = new Viewport();
            Button but = new Button( "press me!", new ButtonListener() );
            view.add( but );
            RootPanel.get().add( view );
        }
        
        class ModalWindow extends Window {
            
            public ModalWindow() {
                super();
                setModal( true );
                Button but = new Button( "press me!", new ButtonListener() );
                add( but );
                show();
            }
        }
        
        class ButtonListener extends SelectionListener {
            
            public void componentSelected( ComponentEvent ce ) {
    
            }
            
            public void handleEvent( BaseEvent be ) {
                new ModalWindow();
            }
            
        }
    }
    In Firefox 3 - and in hosted mode - the windows aren't modal vs the viewport (i.e. i'm able to press the button on the main page), while in IE 7 this is working fine. However in both the browsers the child windows aren't modal vs the other windows (i.e. i can close/resize/press the other windows).
    What's wrong in my code?

    Thanks in advance

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    make sure your doctype is correct - html4 quirks mode

  3. #3
    Ext User
    Join Date
    Oct 2008
    Posts
    9
    Vote Rating
    0
    throttle is on a distinguished road

      0  

    Default


    Thanks for your answer
    In my html i have
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    Are you able to replicate the behaviour or there is something else that may be wrong?

  4. #4
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    I tried your test app and it works fine for me in IE7 and FF3 in Windows XP using gxt 1.1.1

    I'd continue to confirm that your CSS and/or HTML is correct - can't replicate so I can't suggest what is wrong.

    cheers,
    grant

Thread Participants: 1