Alexander Halser 26 Posted July 3, 2022 On MacOS when using a TMainMenu that integrates into the Apple system menu bar, sub-menus automatically close the entire menu when clicked, as illustrated in the screenshot. My configuration: Delphi 11 MacOS Big Sur Before I get into this really deep, could someone please confirm (or not) that this is a Delphi bug? Ideally with Delphi 11 plus an older version. Steps to reproduce the issue: Create a new project Drop a TMainMenu on the form Add several menu items with subitems No onclick handlers required, just go and run on MacOS This bug occurs on the native Apple menu only. The bug occurs with all menu items that represent a submenu. There's no such problem with TPopupMenu and there's no problem on Windows with TMainMenu at all. 1 Share this post Link to post
corneliusdavid 214 Posted July 3, 2022 I removed Apple platforms from earlier versions of Delphi but I confirm this functionality on a quick D11 app. At first, I wasn't completely sure what the problem was but then I used the PAServer app on the Mac and in it's Edit menu, there's a "Copy Special" menu with sub-menu items and clicking on "Copy Special" does not close the sub-menu; a sub-menu with sub-items in the test app does close the menu as if there were an action attached to the sub-menu. I would agree that it's not consistent with typical Mac menu functionality. Share this post Link to post
Alexander Halser 26 Posted July 5, 2022 Wow, you are right! Apple's Terminal app does have direct click handlers for some submenu items. Well, if Apple does it, it must be a feature and can't be a bug, can it? Now we've to find a way in Delphi to make this feature optional... Share this post Link to post