JDK-8258805 : Japanese characters not entered by mouse click on Windows 10
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u271
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-22
  • Updated: 2023-08-01
  • Resolved: 2021-01-22
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.
JDK 11 JDK 17 JDK 8
11.0.11-oracleFixed 17 b07Fixed 8u291Fixed
Description
On Windows 8.1, input characters in the one JTextField are entered instantly only by clicking the other JTextField on the same JFrame.  In Windows 10, it is not entered by the same operation.
Comments
Fix Request Should get backported for parity with 11.0.11-oracle. Applies cleanly.
25-01-2021

Changeset: 53fecba7 Author: Dmitry Markov <dmarkov@openjdk.org> Date: 2021-01-22 19:21:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/53fecba7
22-01-2021

The IME behaviour has changed starting from recent Windows 10 builds. In particular if the complex characters (Japanese, Chinese, etc.) are entered to some component and the focus is transferred to another component (which does not support the IM) the IM is disabled and the unconfirmed composition string gets discarded. On previous Windows versions in the same situation the composition string is not discarded. Fix: It is necessary to take care of unconfirmed composition string once the IME is going to be disabled.
19-01-2021

I can reproduce the issue using the steps provided above. On Windows 10 the characters disappear if JDK 13 or higher is used. When JDK 8u271 is used the characters are still displayed but there is a dotted line below, (i.e. the composition is not completed). On Windows 8.1 the characters are always displayed (w/o dotted line) regardless JDK version. Also the problem does not take place on older versions of Windows 10 and starts happening once the Windows is updated to some recent version, (e.g. 1903, 1909, etc.) It seems some changes in the latest versions of Windows 10 triggered the issue.
08-01-2021

Steps to reproduce: 1. Input some Japanese characters on the top of JTextField objects 2. Click the middle of JTextField objects 3. Click the bottom of JTextField objects 4. You can see the input characters in the first field are NOT entered on Windows 10 Test code: import java.awt.GridLayout; import java.awt.event.*; import javax.swing.JFrame; import javax.swing.JTextField; public class InputJPTest extends JFrame{ public InputJPTest() { this.setBounds(0, 0, 300, 300); this.setLayout(new GridLayout(3, 1)); this.add(new JTextField()); this.add(new MyTextField()); this.add(new JTextField()); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); } public static void main(String[] args) { new InputJPTest().setVisible(true); } class MyTextField extends JTextField{ public MyTextField() { MyTextField.this.enableInputMethods(false); } } }
04-01-2021