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

[TextArea] Ctrl + Tab combination doesn't put focus to another contols.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Incomplete
    • Affects Version/s: 7u13
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Environment:

      jdk1.7.0_11 fx2.2.5b08, plugin, Linux

      Description

      1. Run app in a browser. Click on the text area;
      2. Click ctrl + tab. Text area wil be focused.
      But it is expected that the focuse will move to another control.

      import javafx.application.Application;
      import javafx.beans.property.SimpleStringProperty;
      import javafx.beans.value.ChangeListener;
      import javafx.beans.value.ObservableValue;
      import javafx.scene.Scene;
      import javafx.scene.control.TextArea;
      import javafx.scene.control.TextField;
      import javafx.scene.control.ToggleButton;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaFXApplication12 extends Application {
          
          SimpleStringProperty promptText;
          
          @Override
          public void start(Stage primaryStage) {
              
              promptText = new SimpleStringProperty();
              
              final TextArea textArea = new TextArea();
              
              ToggleButton bindUnidir = new ToggleButton("UNIDIRECTIONAL");
              bindUnidir.selectedProperty().addListener(new ChangeListener<Boolean>() {
                  @Override
                  public void changed(
                          ObservableValue<? extends Boolean> ov,
                          Boolean t, Boolean t1) {
                      
                      if (t1) {
                          textArea.promptTextProperty().bind(promptText);
                      } else {
                          textArea.promptTextProperty().unbind();
                          textArea.setPromptText(String.valueOf(""));
                      }
                  }
              });
              
              ToggleButton bindBidir = new ToggleButton("BIDIRECTIONAL");
              bindBidir.selectedProperty().addListener(new ChangeListener<Boolean>() {
                  @Override
                  public void changed(
                          ObservableValue<? extends Boolean> ov,
                          Boolean t, Boolean t1) {
                      
                      if (t1) {
                          textArea.promptTextProperty().bindBidirectional(promptText);
                      } else {
                          textArea.promptTextProperty().unbindBidirectional(promptText);
                          textArea.setPromptText(String.valueOf(""));
                      }
                      
                  }
              });
              
              TextField text = new TextField("PROMPT TEXT");
              promptText.bind(text.textProperty());
              
              VBox root = new VBox(10.0);
              
              root.getChildren().addAll(
                      textArea, bindBidir,
                      bindUnidir, text);
              
              Scene scene = new Scene(root, 600, 400);
              
              primaryStage.setTitle("Hello World!");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              miflemi Mick Fleming (Inactive)
              Reporter:
              dzinkevi Dmitry Zinkevich (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: