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

Mobile: The sole focusable node do not have keyboard focus

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: fx1.0
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      JavaFX 1.0.1, emulator running on Windows XP, 6u10 b33

      Description

      I've a node which has onKeyPressed defined. When the application comes up, I expect that node to have keyboard focus. But, the node does not have focus when run on emulator. This works fine on desktop.

      To reproduce, run the below code on emulator. When the application comes up, press any key. If the rectangle does not rotate, bug is reproduced.

      import javafx.scene.*;
      import javafx.stage.*;
      import javafx.scene.shape.*;
      import javafx.scene.input.*;
      import javafx.scene.paint.*;
      import javafx.scene.text.*;

      var rotate: Integer = 0;
      var rect: Rectangle = Rectangle {
          x: 10
          y: 10
          width: 60
          height: 50
          rotate: bind rotate
          fill: Color.BLUE
          onMouseClicked: function(e: MouseEvent) {
              rect.requestFocus();
          }
          onKeyPressed: function(e: KeyEvent) {
              rotate++;
          }
      };
      Stage {
          scene: Scene {
              content: [rect, Text {
                  content: bind "Focused: {rect.focused}"
                  x: 10
                  y: 90
              }]
          }
          width: 100
          height: 150
      }

        Attachments

          Activity

            People

            • Assignee:
              ailjin Artem Iljin (Inactive)
              Reporter:
              gramachasunw Girish Ramachandran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: