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