Keyboard does not work in browser on Macs

XMLWordPrintable

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

      Netbeans

      Keyboard does not work in browser on Mac.

      I think this is serious issue (if it is not my fault) - this is basic functionality.

      http://playground.sun.com/~vasya/GoldenRed.html

      I check JFXC-893, it is old and fixed, so I assume this is different issue.

      This is part of code doing events:

      Stage {
          title: "GoldenRed"
          width: 800
          height: 320
          scene: Scene {
              content: [
                  Rectangle {
                      fill: Color.rgb(205, 225, 255);
                      width: 800
                      height: 160
                  }
                  Rectangle {
                      y: 160
                      fill: Color.rgb(150, 150, 130);
                      width: 800
                      height: 80
                  }
                  Rectangle {
                      y: 240
                      fill: Color.rgb(100, 100, 100);
                      width: 800
                      height: 80
                  }
                  gameFieldView
                  Rectangle {
                      opacity: 0
                      focusable: true
                      fill: Color.rgb(100, 100, 100)
                      width: 800
                      height: 350
                      onKeyPressed: function(ke: KeyEvent){
                          if (ke.text == "Right") {
                              walkForwardTimer.play();
                          } else if (ke.text == "Left") {
                              walkBackwardTimer.play();
                          } else if (ke.text == "Space") {
                              hit();
                          }
                      }
                      onMousePressed: function(me: MouseEvent){
                          hit();
                      }
                  }
              ]
          }
      }

      It has initial keyboard handling on Windows Firefox, Chrome. But lose it after changing focus (after I switch window and go back.

            Assignee:
            Parvathi Somashekar (Inactive)
            Reporter:
            Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: