From 3e83bd23630d8bdae06751b374d80debcaccf864 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Mon, 21 Mar 2022 16:25:24 +0100 Subject: [PATCH 1/3] Revert "Fixed: Before this PR, nib2cib failed if a color well or a scrollable text view was added in a CPBox (#2994)" This reverts commit 6544aff88e35d7dd513f48e096e174fd24f073bc. --- AppKit/CPView.j | 4 ---- 1 file changed, 4 deletions(-) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index eeceea8ad..9c4eaef0c 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -597,9 +597,7 @@ var CPViewHighDPIDrawingEnabled = YES; #endif // Notify the subview that it will be moving. -#if PLATFORM(DOM) [aSubview viewWillMoveToSuperview:self]; -#endif // We will have to adjust the z-index of all views starting at this index. var count = _subviews.length, @@ -665,9 +663,7 @@ var CPViewHighDPIDrawingEnabled = YES; [aSubview setNextResponder:self]; [aSubview _scaleSizeUnitSquareToSize:[self _hierarchyScaleSize]]; -#if PLATFORM(DOM) [aSubview viewDidMoveToSuperview]; -#endif // Set the subview's window to our own. if (_window) From 04c2b98ae4dc29c71cdddec62ebbb42a68364897 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 4 Apr 2022 10:16:37 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Fixed:=20=C3=A5=20and=20=C3=85=20did=20not?= =?UTF-8?q?=20work=20well=20on=20scandinavian=20keyboards=20in=20CPTextVie?= =?UTF-8?q?w=20(#3031)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppKit/CPTextView/CPTextView.j | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index a9f42e9e0..a6a0c365e 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1051,7 +1051,7 @@ Sets the selection to a range of characters in response to user action. [[_window platformWindow] _propagateCurrentDOMEvent:YES]; // for the _CPNativeInputManager (necessary at least on FF and chrome) - if (![_CPNativeInputManager isNativeInputFieldActive] && [event charactersIgnoringModifiers].charCodeAt(0) != 229) // filter out 229 because this would be inserted in chrome on each deadkey + if (![_CPNativeInputManager isNativeInputFieldActive] && ![_CPNativeInputManager isDeadKey:event]) [self interpretKeyEvents:[event]]; [_caret setPermanentlyVisible:YES]; @@ -2636,7 +2636,14 @@ var _CPCopyPlaceholder = '-'; { return _CPNativeInputFieldActive; } ++ (void)isDeadKey:(CPEvent)event +{ +#if PLATFORM(DOM) + return event._DOMEvent && (event._DOMEvent.key == 'Dead' || event._DOMEvent.key == 'Process'); +#endif + return NO; +} + (void)cancelCurrentNativeInputSession { @@ -2711,14 +2718,6 @@ var _CPCopyPlaceholder = '-'; var charCode = _CPNativeInputField.innerHTML.charCodeAt(0); - // å and Å need to be filtered out in keyDown: due to chrome inserting 229 on a deadkey - if (charCode == 229 || charCode == 197) - { - [currentFirstResponder insertText:_CPNativeInputField.innerHTML]; - _CPNativeInputField.innerHTML = ''; - return; - } - // chrome-trigger: keypressed is omitted for deadkeys if (!_CPNativeInputFieldActive && _CPNativeInputFieldKeyPressedCalled == NO && _CPNativeInputField.innerHTML.length && _CPNativeInputField.innerHTML != _CPCopyPlaceholder && _CPNativeInputField.innerHTML.length < 3) { From 9361e5d401a58b45318a88acbee00a783ca277c2 Mon Sep 17 00:00:00 2001 From: cacaodev Date: Thu, 10 Nov 2022 10:49:01 +0100 Subject: [PATCH 3/3] FIXED: CPLikePredicateOperatorType was matching substrings Fixes #2955 --- Foundation/CPPredicate/CPComparisonPredicate.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/CPPredicate/CPComparisonPredicate.j b/Foundation/CPPredicate/CPComparisonPredicate.j index cac3d5fe0..f028b595c 100644 --- a/Foundation/CPPredicate/CPComparisonPredicate.j +++ b/Foundation/CPPredicate/CPComparisonPredicate.j @@ -320,8 +320,8 @@ lhs = lhs.stripDiacritics(); rhs = rhs.stripDiacritics(); } - var commut = (_options & CPCaseInsensitivePredicateOption) ? "gi":"g", - reg = new RegExp(rhs.escapeForRegExp(),commut); + var commut = (_options & CPCaseInsensitivePredicateOption) ? "i":"", + reg = new RegExp("^" + rhs.escapeForRegExp() + "$",commut); return reg.test(lhs); case CPBeginsWithPredicateOperatorType: var range = CPMakeRange(0, MIN([lhs length], [rhs length]));