From 836698f8d279f82e3ec6f3e38f5d5bdb4a1c463e Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 18 Feb 2026 17:29:36 +0100 Subject: [PATCH] fixed: caret color --- AppKit/CPTextView/CPTextView.j | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index e6a86ee57..c75df7b3d 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -862,6 +862,11 @@ var kDelegateRespondsTo_textShouldBeginEditing - (void)drawInsertionPointInRect:(CGRect)aRect color:(CPColor)aColor turnedOn:(BOOL)flag { [_caret setRect:aRect]; + +#if PLATFORM(DOM) + _caret._caretDOM.style.backgroundColor = [_insertionPointColor cssString] || "black"; +#endif + [_caret setVisibility:flag stop:NO]; } @@ -2698,10 +2703,6 @@ var CPTextViewAllowsUndoKey = @"CPTextViewAllowsUndoKey", if (aLoc >= [_textView._layoutManager numberOfCharacters]) rect.origin.x = CGRectGetMaxX(rect); -#if PLATFORM(DOM) - _caretDOM.style.backgroundColor = [_textView._insertionPointColor cssString] || "black"; -#endif - [self setRect:rect]; }