@bsky.app/react-native-uitextview 2.7.2 → 2.7.3
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.
- package/ios/RNUITextView.mm +12 -0
- package/package.json +1 -1
package/ios/RNUITextView.mm
CHANGED
|
@@ -164,6 +164,18 @@ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(RNUITextViewEllipsize
|
|
|
164
164
|
_textView = [[UITextView alloc] init];
|
|
165
165
|
}
|
|
166
166
|
_textView.scrollEnabled = false;
|
|
167
|
+
// UITextView is a UIScrollView, so UIKit treats it as one when it overlaps
|
|
168
|
+
// a safe area: it insets the text and, on iOS 26+, draws a scroll edge
|
|
169
|
+
// effect (a progressive blur) over the overlapping lines. Neither makes
|
|
170
|
+
// sense for non-scrolling text, and the blur can get stuck when an
|
|
171
|
+
// ancestor moves the view with a transform.
|
|
172
|
+
_textView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
|
173
|
+
if (@available(iOS 26.0, *)) {
|
|
174
|
+
_textView.topEdgeEffect.hidden = YES;
|
|
175
|
+
_textView.leftEdgeEffect.hidden = YES;
|
|
176
|
+
_textView.bottomEdgeEffect.hidden = YES;
|
|
177
|
+
_textView.rightEdgeEffect.hidden = YES;
|
|
178
|
+
}
|
|
167
179
|
_textView.editable = false;
|
|
168
180
|
_textView.selectable = false;
|
|
169
181
|
_textView.textContainerInset = UIEdgeInsetsZero;
|