Skip to content

Commit

Permalink
Eliminate underline blinks while typing if previous text ends with a …
Browse files Browse the repository at this point in the history
…link
  • Loading branch information
tomekzaw committed Dec 10, 2024
1 parent 1363312 commit 1f53ff2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apple/MarkdownTextFieldObserver.mm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ - (void)textFieldDidChange:(__unused UITextField *)textField {
_active = NO; // prevent recursion
_textField.attributedText = attributedText;
_active = YES;

// Restore cursor position
[_textField setSelectedTextRange:textRange notifyDelegate:NO];

// Eliminate underline blinks while typing if previous text ends with a link
_textField.typingAttributes = _textField.defaultTextAttributes;
}

- (void)textFieldDidEndEditing:(__unused UITextField *)textField
Expand Down

0 comments on commit 1f53ff2

Please sign in to comment.