JDK-8039001 : [macosx] Textfields in dialogs are disabled after using F3 on Mac OS X to select a window
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u6,8
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: x86
  • Submitted: 2014-03-17
  • Updated: 2022-07-12
  • Resolved: 2022-07-12
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
tbdResolved
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
1.8.0-ea build 132
The same happens on 1.7.0_51

ADDITIONAL OS VERSION INFORMATION :
10.9.1

A DESCRIPTION OF THE PROBLEM :
I have a dialog open and I'm typing text in a text field.
Then I press F3 and mouse-click another window.
I press F3 again and mouse click my app again.
The text field in my dialog is now disabled.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I would just run my simple program

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect textfields to remain enabled.
ACTUAL -
Text fields are disabled.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
   public static void main(String[] args) throws Exception
   {
      JFrame f = new JFrame("The mother frame");
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setSize(350, 150);
      f.setVisible(true);
      f.setLocationRelativeTo(null);
      JDialog d = new JDialog(f, "Press F3, mouseclick another window, press F3, mouseclick this.");
      d.setModal(true);
      JTextField t = new JTextField("After the F3+clickanother+F3+clickthis I will be disabled");
      d.getContentPane().add(t);
      d.setSize(300, 100);
      d.setLocationRelativeTo(f);
      d.setVisible(true);
   }

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
I can CMD+TAB twice to make it enabled again.


Comments
After the pressing F3 the second time the (LWCToolkit)Toolkit.getDefaultToolkit()).isApplicationActive() statement from the CPlatformWindow.deliverWindowFocusEvent() method returns false and the focus event is not delivered to the dialog. See the issue JDK-7150349
08-04-2014