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

macOS: MenuBar with custom menu items disappears

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx23
    • javafx
    • None
    • macOS 15.3.1 M1

      This bug applies to macOS only.

      To reproduce:

      - run the attached code sample
      - click on the menu, select "Use Custom Menu Item"
      - click on the menu, verify that a custom menu item (a button) appeared in the menu
      - select "Use System Menu"

      Expected:
      - the menu bar stays where it was (inside the window) because custom menu items are not supported inside the system menu

      Observed:
      - the menu disappears
      - stderr outputs "Warning: MenuBar ignored property useSystemMenuBar because menus contain CustomMenuItem"

      Notice that if the order of steps is modified slightly, the menu bar does behave as expected:

      - restart the sample application
      - select "Use System Menu"
      - unselect "Use System Menu" (in the system menu)
      - select "Use Custom Menu Item"
      - select "Use System Menu"
      --> observe that the menu bar remains inside the window as expected.

       
      stderr: MenuBarSkin:733

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: