PDA

View Full Version : Modal Window blanks Listboxes in IE6.0



valavanurman
29 Apr 2009, 9:49 AM
When a modal window is popped up, the listboxes in the page behind gets blanked out in IE6.0. In IE7 this does not happen.

If the window is not made modal, it works well.

See sample code attached.



package com.mycompany.project.client;

import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Window;
import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class GxtWindow implements EntryPoint {
private Button clickMeButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();

VerticalPanel vp = new VerticalPanel();
final ListBox lb = new ListBox();

lb.addItem("TEST LISTBOX1");
vp.add(lb);
final ListBox lb2 = new ListBox();
lb2.addItem("TEST LISTBOX2");
vp.add(lb2);
final ListBox lb3 = new ListBox();
lb3.addItem("TEST LISTBOX3");
vp.add(lb3);
Button modalBtn = new Button("Modal Button");
Button nonModalBtn = new Button("Non Modal Button");
vp.add(modalBtn);
vp.add(nonModalBtn);
rootPanel.add(vp);
modalBtn.addClickListener(new ClickListener() {
public void onClick(Widget w) {
VerticalPanel vP = new VerticalPanel();
vP.add(new Label("TEST WINDOW"));
vP.add(new Label("If you're using IE6, the list boxes behind would be blanked out."));
Window win = new Window();
win.setModal(true);
win.setWidth(390);
ContentPanel cp = new ContentPanel();
cp.setHeading("test");
win.add(cp);
cp.add(vP);
cp.setHeading("TEST HEADING");
win.layout();
win.show();
}
});
nonModalBtn.addClickListener(new ClickListener() {
public void onClick(Widget w) {
VerticalPanel vP = new VerticalPanel();
vP.add(new Label("TEST WINDOW"));
vP.add(new Label("If you're using IE6, the list boxes behind should show as it was."));
Window win = new Window();
win.setModal(false);
win.setWidth(390);
ContentPanel cp = new ContentPanel();
cp.setHeading("test");
win.add(cp);
cp.add(vP);
cp.setHeading("TEST HEADING");
win.layout();
win.show();
}
});


}
}

sven
29 Apr 2009, 9:51 AM
This is a shim and it is needed in IE6.

You can set GXT.useShims to false, but this will bring up more issues on IE6

valavanurman
29 Apr 2009, 9:53 AM
What does it mean?
Our users would need to view the information at the back as the need to print the screen shots. Most of them are in IE6. Is there no workaround?

sven
29 Apr 2009, 9:56 AM
You can disable shims as i suggested or dont use a model window.