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

EventHandler on node inside of NodeMenuItem cannot programmatically close menu without problems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • fx2.0
    • javafx
    • Windows 7, FX 2.0 public beta (1st release)

      Related to RT-13889.

      While attempting to workaround the problem discussed in RT-13889, I discovered that if I try to programmatically hide the menu (by calling MenuButton.hide(), or MenuItem.getParentPopup().hide()) that the popup was successfully hidden but it somehow locked the UI from receiving further events until I minimized and restored the application or in some other way unfocused and refocused the FX application. Sample code is attached.

      Steps to Repeat:

      - Run the attached program
      - Click the "Toggle" button to see that show/hide work just fine when being called from another control's event handler
      - Now drop the Menu Button and click the black Rectangle. The EventHandler on the rectangle calls hide on the MenuButton (I'm trying to do this because of RT-13889). The menu is successfully hidden, but notice how suddenly you can't interact with the buttons anymore until you focus away from the FX application and then refocus it.

            psomashe Parvathi Somashekar (Inactive)
            kmcintyrejfx Kyle McIntyre (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: