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]; }