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

Newly added JavaFX controls unexpectedly steal focus from Swing controls

    XMLWordPrintable

Details

    Description

      Run the attached program and click "Toggle". Note that the focus will transition to the TextField. This is unexpected as there is no user code requesting so.

      Exploratory debugging shows that when the Scene transitions from "no controls" to "has some controls", it decides that it needs to start afresh as if it has just been shown on the screen and so passes the focus to one of the controls. This is probably OK for a normal JavaFX scene, but causes unexpected focus transitions when the Scene is embedded in a Swing application.

      Note that the problem was originally reported against WebView running inside JDeveloper, see RT-21097, but appears to not be WebView-specific.

      Attachments

        Issue Links

          Activity

            People

              miflemi Mick Fleming
              vbaranov Vasiliy Baranov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: