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

Keyboard does not work in browser on Macs

    Details

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

      Netbeans

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: