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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, openjfx11, openjfx17, openjfx18, openjfx19
    • Fix Version/s: tbd
    • Component/s: javafx
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows

      Description

      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


        Attachments

          Activity

            People

            Assignee:
            aghaisas Ajit Ghaisas
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: