Skip to content

Commit 2dd0fad

Browse files
committed
Return Early From updateSelectionViews When Not First Responder
1 parent 49b9a5e commit 2dd0fad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public class TextSelectionManager: NSObject {
134134
/// Update all selection cursors. Placing them in the correct position for each text selection and reseting the
135135
/// blink timer.
136136
func updateSelectionViews() {
137+
guard textView?.isFirstResponder ?? false else { return }
137138
var didUpdate: Bool = false
138139

139140
for textSelection in textSelections {

0 commit comments

Comments
 (0)