PDA

View Full Version : [CLOSED] Modal dialog doesn't work in IE6



Igor Nikolaev
8 Jul 2008, 3:29 AM
Modal dialog is not modal in IE6. In IE7 everything works fine.

Ext GWT version: 1.0
Browser: Internet explorer 6.0.2900.2180.xpsp.060411-1541 Update Versions:; SP2;
OS: Windows XP SP2

Here is sample code:




public class MainPage extends ContentPanel {


@Override


protected void onRender(Element parent, int index) {

super.onRender(parent, index);

Button button = new Button("Open dialog");

button.addListener(Events.OnClick, new Listener() {

public void handleEvent(BaseEvent be) {

Dialog dialog = new Dialog();
dialog.setModal(true);
dialog.setHeading("Modal dialog sample");
dialog.show();

}
});

add(button);
}
}

darrellmeyer
8 Jul 2008, 5:34 AM
I do not see any issues with IE6 and modal dialogs. Have you tried the message box demo in the explorer demo (http://extjs.com/explorer/#messagebox)? If you still have problems, the post your code in this format (http://extjs.com/forum/showthread.php?t=40289).

Igor Nikolaev
8 Jul 2008, 6:53 AM
Yes, the message box example works fine. What the difference then? Why the same code works for IE7 and doesn't work for IE6 in my case.

I have created a simple page, like one in my post and used message box instead of dialog. It didn't work.

I made my application from the explorer demo. I have a menu view on the left, and content view in center. Content view has content panel with FitLayout.
To this content panel I add a MainPage which is also ContentPanel.

I add button to MainPage which opens MessageBox on click. And it's not modal.

In my previous post I have writted my operating system, browser, and Ext GWT version.
I guess I missed GWT version - it's 1.5 RC1.

darrellmeyer
8 Jul 2008, 6:59 AM
2 things you can try. First, listen for Select not OnClick, and two, open the dialog in a DeferredCommand.

Igor Nikolaev
8 Jul 2008, 7:37 AM
2 things you can try. First, listen for Select not OnClick, and two, open the dialog in a DeferredCommand.

Tried DeferredCommand - stopped working even under IE7. But if I click menu item it becomes modal (in IE7).

Listening for Select also had no result.

I will make a separate sample from Explorer demo tomorrow. Maybe that will help me understand what I'm doing wrong.

Igor Nikolaev
9 Jul 2008, 12:42 AM
Solved :)
The problem was that I used .html file that was generated by GWT on project creation.
The only thing was different in the project - DOCTYPE :)