fixed: tab copypaste

This commit is contained in:
daboe01 committed 2026-05-29 18:19:03 +02:00
1 parent 7b6cb51f4d
commit c58a5b520e
3 files changed
+9 -11

No files matched your search

+6 -2
View File
@@ -56,6 +56,12 @@ var kDefaultTabInterval = 28.0;
return [self initWithTextAlignment:aType location:aLocation options:nil];
}
// Added to resolve the unrecognized selector exception in the RTF producer
- (CPTabStopType)tabStopType
{
return _alignment;
}
- (BOOL)isEqual:(id)other
{
if (self === other) return YES;
@@ -217,8 +223,6 @@ var _sharedDefaultParagraphStyle = nil;
@end
// MARK: - CPMutableParagraphStyle Implementation
// MARK: - CPMutableParagraphStyle Implementation
@implementation CPMutableParagraphStyle : CPParagraphStyle
+2 -1
View File
@@ -3049,8 +3049,9 @@ var _CPCopyPlaceholder = '-';
// Intercept problematic keys before the browser acts.
_CPNativeInputField.addEventListener('keydown', function(e) {
if (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>.
// - 'Backspace' on empty: Prevents inserting junk characters on iPadOS.
e.preventDefault();