Mobile: The sole focusable node do not have keyboard focus

XMLWordPrintable

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

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

      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
      }

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

              Created:
              Updated:
              Resolved:
              Imported: