TextField in the main window steals the focus of the Windows emoji keyboard of another TextField in Popup
Glavo
zjx001202 at gmail.com
Tue Mar 29 15:50:12 UTC 2022
When using MaterialFX, I encountered such a problem:
When the focus of a window is on a TextField, another TextField in a Popup
that pops up on this window cannot use the Windows emoji keyboard or IME
for input.
In this case, all input from the windows emoji keyboard or IME will go into
the TextField of the main window, but the clipboard and direct keyboard
input work fine.
I found a minimal reproducer:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Popup;
import javafx.stage.Stage;
public class JFXTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
var root = new VBox(new TextField());
primaryStage.setScene(new Scene(root, 100, 100));
primaryStage.show();
Popup popup = new Popup();
popup.getContent().add(new TextField());
popup.show(primaryStage, 0.0, 0.0);
}
public static void main(String[] args) {
Application.launch(JFXTest.class, args);
}
}
Running this program will open a window with a TextField and another
TextField will pop up in the upper left corner of the screen.
Use the `Windows logo key + . (period)` on the keyboard to open the
emoji keyboard (
https://support.microsoft.com/en-us/windows/windows-10-keyboard-tips-and-tricks-588e0b72-0fff-6d3f-aeee-6e5116097942
),
and enter any emoji with emoji keyboard in the TextField in the upper left
corner of the screen, then the entered emoji will appear in the TextField
in the main window.
This problem breaks the `MFXFilterComboBox` of MaterialFX, preventing it
from working with the emoji keyboard or IME.
Can anyone keep an eye on it? If possible, I'm asking anyone to help me
open an issue in JBS, thanks a lot.
More information about the openjfx-dev
mailing list