@expensify/react-native-live-markdown 0.1.78 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,6 +72,14 @@
72
72
  _textView = (RCTUITextView *)_backedTextInputView;
73
73
  [_textView setMarkdownUtils:_markdownUtils];
74
74
  NSLayoutManager *layoutManager = _textView.layoutManager; // switching to TextKit 1 compatibility mode
75
+
76
+ // Correct content height in TextKit 1 compatibility mode. (See https://github.com/Expensify/App/issues/41567)
77
+ // Consider removing this fix if it is no longer needed after migrating to TextKit 2.
78
+ CGSize contentSize = _textView.contentSize;
79
+ CGRect textBounds = [layoutManager usedRectForTextContainer:_textView.textContainer];
80
+ contentSize.height = textBounds.size.height + _textView.textContainerInset.top + _textView.textContainerInset.bottom;
81
+ [_textView setContentSize:contentSize];
82
+
75
83
  layoutManager.allowsNonContiguousLayout = NO; // workaround for onScroll issue
76
84
  object_setClass(layoutManager, [MarkdownLayoutManager class]);
77
85
  [layoutManager setValue:_markdownUtils forKey:@"markdownUtils"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",