Skip to content

Commit d44884c

Browse files
committed
Use default attributes when all text is deleted.
1 parent 1523075 commit d44884c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Aztec/Classes/TextKit/TextView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ open class TextView: UITextView {
647647
evaluateRemovalOfSingleLineParagraphAttributesAfterSelectionChange()
648648
ensureRemovalOfParagraphAttributesWhenPressingBackspaceAndEmptyingTheDocument()
649649
ensureCursorRedraw(afterEditing: deletedString.string)
650-
650+
recalculateTypingAttributes()
651651
notifyTextViewDidChange()
652652
}
653653

@@ -1247,6 +1247,7 @@ open class TextView: UITextView {
12471247
private func recalculateTypingAttributes(at location: Int) {
12481248

12491249
guard storage.length > 0 else {
1250+
typingAttributes = defaultAttributes
12501251
return
12511252
}
12521253

0 commit comments

Comments
 (0)