Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,092
    • Issues 2,092
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #35929
Closed
Open
Created Aug 04, 2019 by FPC Admin account@fpc_adminOwner

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

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:

  1. make a form and call form.ShowModal
  2. create TPopupMenu, and add some items with OnClick event assigned
  3. add sub-menu items with OnClick event assigned
  4. TPopMenu.popup
  5. 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)
Assignee
Assign to
Time tracking