From 3b1c1c0886be11eb0246301590690f12ca2418f8 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 29 May 2026 22:08:00 +0200 Subject: [PATCH] fixed: tab could not be entered using the keyboard --- AppKit/CPTextView/CPTextView.j | 3 ++- AppKit/CPWindow/CPWindow.j | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 1c1a26091..de62ce3d4 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -3049,7 +3049,8 @@ var _CPCopyPlaceholder = '-'; // Intercept problematic keys before the browser acts. _CPNativeInputField.addEventListener('keydown', function(e) { - if (e.key === 'Tab' || e.key === 'Enter' || (e.key === 'Backspace' && _CPNativeInputField.innerHTML === '')) { + if (e.key === 'Tab' || e.key === 'Enter' || (e.key === 'Backspace' && _CPNativeInputField.innerHTML === '')) + { // Prevent browser default action: // - 'Tab': Prevents browser focus navigation, allowing Cappuccino key bindings (like option-tab or tab) to work. // - 'Enter': Prevents inserting

. diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 1b233d067..73530fd08 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1951,7 +1951,8 @@ CPTexturedBackgroundWindowMask return [[self firstResponder] keyUp:anEvent]; case CPKeyDown: - if ([anEvent charactersIgnoringModifiers] === CPTabCharacter) + if ([anEvent charactersIgnoringModifiers] === CPTabCharacter && + !([anEvent modifierFlags] & (CPAlternateKeyMask | CPCommandKeyMask))) { if ([anEvent modifierFlags] & CPShiftKeyMask) [self selectPreviousKeyView:self];