JDK-6817482 : On IE, modal JDialog from an Applet in html frame is not modal
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0u16
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-03-14
  • Updated: 2011-02-16
  • Resolved: 2009-08-24
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.
Other Other Other JDK 6 JDK 7
5.0u16-crevFixed 5.0u17-crevFixed 5.0u21 b01Fixed 6u16-revFixed 7Resolved
Related Reports
Relates :  
Description
JRE 1.5.0_16 + IE6/7.  

If an applet in an html frame shows a JDialog created as
"new JDialog((Frame)null, true);" does not behave as a
modal dialog.  Users can move brwser window in front of
the dialog by clicking the browser window.

  <frameset name="main" cols="300,*" framespacing="0">
      <frame src="form.html" frameborder="0" marginwidth="0" />
      <frame src="control.html" frameborder="0" marginwidth="0" />
  </frameset>

// control.html
  <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
    <applet code="modal2.ToolApplet.class" archive="../dist/Modal2.jar" width="100%" height="100%" name="SampleForm" vspace="0" hspace="0" >
    </applet>
  </body>

This symptom is not seen on Firefox or Safari.

The symptom was seen on 6u7 as well, but with 6u12, the
dialog works as a modal dialog.

So, it looks like java plugin for IE in 1.5 and 6.0-6u7 issue.
.

Comments
EVALUATION Following changes in OnEnableModeless() fix the issue: if (FAILED(hr)) { spInPlaceFrame->GetWindow(&containerWindow); + + // With IE7 and IE8, containerWindow would be the handle of 'TabWindowClass' window + // and not IEFrame window, so get the handle of it's parent. + TCHAR className[64] = {0}; + ::GetClassName(containerWindow, className, 64*sizeof(TCHAR)); + if (strcmp(className, "IEFrame") != 0) { + containerWindow = ::GetParent(containerWindow); + } +
21-07-2009