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

TextField consumes Enter keys, so Default buttons don't get them.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.0.2
    • 7-pool
    • javafx

      Prior to build 45, whenever I hit enter in a text field, rather than triggering the default button, I got an NPE, as documented by this issue: http://javafx-jira.kenai.com/browse/RT-16546.
      Now, with build 45 I no longer get the NPE, but the default buttons do not work either. I have a pretty simple scene with a few labels, textfields, and 1 default button. I have set the defaultButton property of the button to true. When I place the cursor in a text field and hit enter, nothing happens.

      I am curious, does it matter that the UI containing the default button is removed from the node hierarchy and then readded? To ensure no information is lost, I tried reinvoking setDefaultButton after adding the UI to the scene, but that did not improve things.

      I would like to help out here, so please tell me if there is something I can look for when debugging. At the moment I do not have any leads to follow - there are no exceptions or warnings... it just does not work.

            leifs Leif Samuelsson (Inactive)
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: