Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8284583

TextField in the main window steals the focus of the Windows emoji keyboard

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • jfx11, 8, jfx17, jfx18, jfx19
    • javafx
    • x86_64
    • windows

      ADDITIONAL SYSTEM INFORMATION :
      Any Java environment

      A DESCRIPTION OF THE PROBLEM :
      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.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Running the test case 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.


      ---------- BEGIN SOURCE ----------
      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);
          }
      }

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

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: