fixed: tab could not be entered using the keyboard

This commit is contained in:
daboe01
2026-05-29 22:08:00 +02:00
parent dbc8bfc7f3
commit 3b1c1c0886
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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 <div><br></div>.
+2 -1
View File
@@ -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];