Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ios/inputAttributesManager/InputAttributesManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ - (void)manageTypingAttributesWithOnlySelection:(BOOL)onlySelectionChanged {
// Typing attributes get reset (except alignment) when only selection changed
// to an empty line (or empty line with newline).
if (onlySelectionChanged) {
// if there is no content, there is no need to clear the typing attributes
if (textView.textStorage.string.length == 0) {
return;
}

NSRange paragraphRange =
[textView.textStorage.string paragraphRangeForRange:selectedRange];
// User changed selection to an empty line (or empty line with a newline).
Expand Down
Loading