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

CancelButton, Button with setCancelButton(true), still works when it's parent Node is removed from the scene or when it's parent Node is being hidden

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 7u15
    • javafx
    • Mac OS X 10.8.2 and Ubuntu 12.04 both running JavaFX Version: 2.2.7-b01

      We have a Button control inside an HBox and the HBox is added to the root node of our scenegraph. We then call setCancelButton(true) to make this Button a CancelButton. Later we remove the HBox from the root node but the CancelButton still responds to the Escape-Key. The same problem exists when the HBox is simply hidden with setVisible(false).

      How can we make sure JavaFX forgets about the special handling of the cancelButton when the Node the button belongs to is removed or hidden? Are we supposed to manually call setCancelButton(false) in this cases?

            miflemi Mick Fleming
            jhohmuthjfx Jens Hohmuth (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: