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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      Windows 7, FX 2.0 public beta (1st release)

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: