TMenuItem.OnClick is not called from a submenu, if TPopupMenu.PopUp occurs during a modal dialog
Original Reporter info from Mantis: Blake
-
Reporter name: Blake
Original Reporter info from Mantis: Blake
- Reporter name: Blake
Description:
When showing a popup menu during a modal dialog, the OnClick event is not called for any sub-menu TMenuItem.
If the exact same procedure occurs without any modal dialog (ie just from a normal floating window), then the OnClick event is called properly.
This appears to be a bug in cocoa. It was working fine in carbon.
Steps to reproduce:
- make a form and call form.ShowModal
- create TPopupMenu, and add some items with OnClick event assigned
- add sub-menu items with OnClick event assigned
- TPopMenu.popup
- click on any submenu items, and the OnClick event is not called
Do the same steps but call form.Show in step 1, and the submenus work ok.
See attached demonstration project.
Additional information:
Perhaps related:
https://bugs.freepascal.org/view.php?id=21997
Mantis conversion info:
- Mantis ID: 35929
- OS: macOS
- OS Build: 10.14.6
- Build: 61618
- Version: 2.0.3 (SVN)
- Fixed in revision: 61674 (#f6181c1d)