JDK-6968959 : Modality depth is not maintained correctly for IE window
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0u17-crev
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2010-07-14
  • Updated: 2011-02-17
  • Resolved: 2010-08-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
5.0u17-crev b04Fixed
Related Reports
Relates :  
Relates :  
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.

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

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.