United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6968959 : Modality depth is not maintained correctly for IE window

Details
Type:
Bug
Submit Date:
2010-07-14
Status:
Closed
Updated Date:
2011-02-17
Project Name:
JDK
Resolved Date:
2010-08-13
Component:
deploy
OS:
windows_vista
Sub-Component:
plugin
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0u17-crev
Fixed Versions:
5.0u17-crev (b04)

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
Vista, IE7 + 5u17 based custom revision.

While working on an IE window activation issue when one of modal dialogs is closed,
it turned out that moving focus to next modal dialog at a close of a modal 
dialog was not enough.  

IE window can be activated by clicking title bar even if a modal JDialog is still shown.

                                    

Comments
SUGGESTED FIX

These are joint requests for CR 6954221 and CR 6968959.
Webrev: http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=3668
RTI: https://jetsvr.sfbay.sun.com:8443/BugApproval/ViewDetail.jsp?index=9965
                                     
2010-08-12
EVALUATION

This issue happens because the original fix for CR 6579743 does not
take into account nested modality. The following condition in
AwtDialog::DisableTopLevelsCallback()

if (hWndComponent == NULL && hParent != NULL &&
    IsWindowEnabled(hParent) &&                     <<<===
    IsWindowVisible(hParent)
) {
    AwtDialog::IncrementDisabledLevel(hParent, 1);
}

does not allow to properly maintain the disabled level counter for
the native parent window of the modal dialog (that is the browser window
in the customer's test case).

There are two approaches to fix this problem:

1) To left this "native parent window" check for the modal dialog only.
In this case we can move it to AwtDialog::ModalEnable() and
AwtDialog::ModalDisable() methods.

2) To do the "native parent window" check for all Java windows run in
the given toolkit.

For now the first approach was chosen and successfully verified by
the customer. But in case of further modality-related problems, it makes
sense to try the second approach.
                                     
2010-08-04



Hardware and Software, Engineered to Work Together