Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ const htmlStyle: HtmlStyle = {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
},
content: {
flexGrow: 1,
Expand Down
11 changes: 8 additions & 3 deletions ios/EnrichedTextInputView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,15 @@ - (void)anyTextMayHaveBeenModified {
[self tryUpdatingHeight];
// update active styles as well
[self tryUpdatingActiveStyles];

// update drawing
NSRange wholeRange = NSMakeRange(0, textView.textStorage.string.length);
[textView.layoutManager invalidateLayoutForCharacterRange:wholeRange actualCharacterRange:nullptr];
[textView.layoutManager invalidateDisplayForCharacterRange:wholeRange];
dispatch_async(dispatch_get_main_queue(), ^{
NSRange wholeRange = NSMakeRange(0, textView.textStorage.string.length);
NSRange actualRange = NSMakeRange(0, 0);
[textView.layoutManager invalidateLayoutForCharacterRange:wholeRange actualCharacterRange:&actualRange];
[textView.layoutManager ensureLayoutForCharacterRange:actualRange];
[textView.layoutManager invalidateDisplayForCharacterRange:wholeRange];
});
}

// MARK: - UITextView delegate methods
Expand Down
Loading