From beeabd41a05bb854b5a0fc664d6b9198394d1b57 Mon Sep 17 00:00:00 2001 From: rich2014 Date: Wed, 10 Jan 2024 18:33:59 +0800 Subject: [PATCH] Cocoa: Accelerator key (&) should be only supportted in TPopupMenu on macOS --- lcl/interfaces/cocoa/cocoamenus.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/interfaces/cocoa/cocoamenus.pas b/lcl/interfaces/cocoa/cocoamenus.pas index 3353d66a3a..12a5dce675 100644 --- a/lcl/interfaces/cocoa/cocoamenus.pas +++ b/lcl/interfaces/cocoa/cocoamenus.pas @@ -219,7 +219,7 @@ begin aTitle := lclMenuItem.Caption; aShortCut := lclMenuItem.ShortCut; - if aShortCut=0 then begin + if (lclMenuItem.Owner is TPopupMenu) and (aShortCut=0) then begin if not Assigned(lclMenuItem.Action) then begin key:= getHotkeyFromTitle( aTitle ); if key<>0 then