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

Clicking on a Menu or MenuButton when it is showing causes the popup to reappear

XMLWordPrintable

      1) Run HelloMenuButton
      2) Click on MenuButton1, the popup appears
      3) Click on MenuButton1 while the popup is up. The menu hides and reappears. Instead, the menu should only hide.

      Looks like autohide is kicking in before this code from MenuBehavior (similar code is also in MenuButton's behavior code):

          @Override public void mousePressed(MouseEvent e) {
              super.mousePressed(e);
              if (menu.isShowing() && menu.getParentMenu() == null) {
                  hide();
              } else {
                  show();
              }
          }

      So, when this method is called, the menu is not showing because of autohide, so we just immediately show it.

            leifs Leif Samuelsson (Inactive)
            wwalkerwse Willie Walker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: