From ac52d32c2928bdb63176799ccb2e2b5e11137f25 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 18 Feb 2026 16:17:45 +0100 Subject: [PATCH] fixed: caret color in textview --- AppKit/CPTextView/CPTextView.j | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index ce6396e52..e6a86ee57 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -2632,7 +2632,6 @@ var CPTextViewAllowsUndoKey = @"CPTextViewAllowsUndoKey", style.padding = "0px"; style.margin = "0px"; style.whiteSpace = "pre"; - style.backgroundColor = "black"; _caretDOM.style.width = "1px"; _caretDOM.style.zIndex = 10001; _textView = aView; @@ -2699,6 +2698,10 @@ 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]; }