JDK-8199748 : Touch keyboard is not shown, if text component gets focus from other text component
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8-pool,11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_10
  • Submitted: 2018-03-16
  • Updated: 2019-01-17
  • Resolved: 2018-04-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.
JDK 11 JDK 7 JDK 8
11 b13Fixed 7u201Fixed 8u181Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
- JDK 11 compiled from the source code in the repository (http://hg.openjdk.java.net/jdk/client) on 03/16/2018.
- JDK 8 compiled from the source code in the repository (http://hg.openjdk.java.net/jdk8u/jdk8u-dev) on 03/16/2018.

ADDITIONAL OS VERSION INFORMATION :
MS Windows 10 OS

A DESCRIPTION OF THE PROBLEM :
Touch keyboard which is specific to MS Windows 10, MS Windows 8.1, MS Windows 8 OSes is not automatically shown, if a user touches one Swing or AWT text component, after other Swing or AWT text component had focus and the touch keyboard was shown for that other text component.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Make sure that Windows 10 is installed on the host and a display with the touch screen is connected to the host.
2. Switch on "Tablet" mode in the OS.
3. Compile and run the attached test case "MoveFocusOnlyBetweenTextComponents.java".
4. Touch the area of any text component shown in the test case window. As the result the touch keyboard should be shown.
5. Touch the area of another text component in the test case window. The bug is reproduced, if the touch keyboard is hidden and not shown again for the second text component which was touched.
Comments
It was deliberately implemented in the fix for the bug JDK-8166772 that the touch keyboard can be shown only on a touch or a mouse click and not on gaining of a focus, so the touch keyboard is shown only on "java.awt.event.MouseEvent.MOUSE_RELEASED" event and is hidden on "java.awt.event.FocusEvent.FOCUS_LOST" event. A REASON OF THE ISSUE: When the touch keyboard is already shown for one text component and a user touches another text component, then the following 2 events occur in the presented order: 1. "MouseEvent.MOUSE_RELEASED" event arrives. The touch keyboard is shown for the new text component. 2. "FocusEvent.FOCUS_LOST" event arrives for the previous text component. The touch keyboard shown for the new text component becomes hidden.
16-04-2018

The test case was attached to the bug as the file "MoveFocusOnlyBetweenTextComponents.java".
16-03-2018