JDK-8189282 : JavaFX: Invalid position of candidate pop-up of InputMethod in Hi-DPI on Windows
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u60,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2017-10-13
  • Updated: 2024-01-11
  • Resolved: 2024-01-10
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
jfx22 b25Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows 10

EXTRA RELEVANT SYSTEM CONFIGURATION :
HIDPI Display

A DESCRIPTION OF THE PROBLEM :
Invalid display position of candidate pop-up of InputMthod in HIDPI environment of WIndows.

The problem that the display position of this InputMethod becomes incorrect thinks that the cause is different,
This phenomenon occurs frequently.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Start up the attached program.
2. Enter Japanese
3. Please check the position of conversion candidate.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The popup is under the input cursor.
ACTUAL -
The popup is on the upper left of the input cursor.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

public class InputMethodTest extends Application{

	@Override
	public void start(Stage primaryStage) throws Exception {
		
		WebView webView = new WebView();
		webView.getEngine().loadContent("<html><body><div><input/><div><textarea rows=10 cols=80></textarea></div>");
		
		VBox root = new VBox(16, new TextField(), new TextArea(), webView);
		
		Scene scene = new Scene(root, 600, 600);
		primaryStage.setScene(scene);
		primaryStage.show();
		
	}
	
	public static void main(String[] args) {
		Application.launch(args);
	}
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
This problem can be avoided by turning off the HIDPI mode.

-Dprism.allowhidpi=false


Comments
Changeset: 5b1fce55 Author: Martin Fox <mfox@openjdk.org> Date: 2024-01-10 17:45:57 +0000 URL: https://git.openjdk.org/jfx/commit/5b1fce559d6a3abb8ab19daf6b1177dc4ba3fcdd
10-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jfx/pull/1311 Date: 2023-12-26 16:48:19 +0000
26-12-2023

This bug is also affecting the new IME code that's being worked on for Gtk (JDK-8305418). In most other cases code in GlassViewEventHandler applies the platform X and Y scale factors but is not doing this for getInputMethodCandidatePosRequest. Preliminary testing indicates that applying this scale fixes the problem on Windows and Linux and doesn't affect Mac.
23-12-2023

This also fails in Hi-DPI mode on 8u60 and later (note that Hi-DPI is only enabled by default on 8u60 if the scale is >= 150%).
20-10-2017

I note that Swing has the same bug, so I will file a separate issue for that. Update: filed JDK-8189687 to track the Swing bug.
19-10-2017

I can reproduce this bug. The IME popup obscures what is being typed making it very difficult to use.
19-10-2017