From ea47767bb89ee88deddc4f0e33a1e71a69134446 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 21 Feb 2026 11:51:25 +0100 Subject: [PATCH 1/3] fixed: menu key support conflicting with browser native menu keys --- AppKit/CPMenu/CPMenu.j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AppKit/CPMenu/CPMenu.j b/AppKit/CPMenu/CPMenu.j index 962307a66..4ef91ea7e 100644 --- a/AppKit/CPMenu/CPMenu.j +++ b/AppKit/CPMenu/CPMenu.j @@ -1077,6 +1077,9 @@ var _CPMenuBarVisible = NO, anEvent._isKeyEquivalent = YES; // prevent the menu keystroke from beeing inserted into textview [self performActionForItemAtIndex:index]; + + // we are done with this event in cappuccino space. do not let the browser do something weird additionally (e.g. command-o). + _CPDOMEventStop(anEvent._DOMEvent); } else { From 980e2f2c916e5446ac3808d6f77cb8b0b0173b32 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 21 Feb 2026 12:08:47 +0100 Subject: [PATCH 2/3] fixed: dom protection was missing --- AppKit/CPMenu/CPMenu.j | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AppKit/CPMenu/CPMenu.j b/AppKit/CPMenu/CPMenu.j index 4ef91ea7e..5ee13d4fc 100644 --- a/AppKit/CPMenu/CPMenu.j +++ b/AppKit/CPMenu/CPMenu.j @@ -1078,8 +1078,10 @@ var _CPMenuBarVisible = NO, anEvent._isKeyEquivalent = YES; // prevent the menu keystroke from beeing inserted into textview [self performActionForItemAtIndex:index]; +#if PLATFORM(DOM) // we are done with this event in cappuccino space. do not let the browser do something weird additionally (e.g. command-o). _CPDOMEventStop(anEvent._DOMEvent); +#endif } else { From df594ae48e6eb97f9189d3fc9062f9e93e744fd7 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 21 Feb 2026 18:48:19 +0100 Subject: [PATCH 3/3] fixed: copy/paste issue --- AppKit/CPMenu/CPMenu.j | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AppKit/CPMenu/CPMenu.j b/AppKit/CPMenu/CPMenu.j index 5ee13d4fc..d8569ed43 100644 --- a/AppKit/CPMenu/CPMenu.j +++ b/AppKit/CPMenu/CPMenu.j @@ -1080,7 +1080,11 @@ var _CPMenuBarVisible = NO, #if PLATFORM(DOM) // we are done with this event in cappuccino space. do not let the browser do something weird additionally (e.g. command-o). - _CPDOMEventStop(anEvent._DOMEvent); + // but we must not stop copy/paste events as these can only be handled by the browser at this time even if they are in our menu + // (until we move to CPTextView as the fieleditor) + + if (characters != "c" && characters != "x" && characters != "v") + _CPDOMEventStop(anEvent._DOMEvent); #endif } else