react-native-macos 0.68.46 → 0.68.48
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +4 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +16 -0
- package/React/Base/RCTTouchHandler.m +4 -0
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -338,6 +338,10 @@ static RCTUIColor *defaultPlaceholderColor() // TODO(OSS Candidate ISS#2710739)
|
|
|
338
338
|
// UI/NSTextField do NOT have textContainerInset properties
|
|
339
339
|
_textContainerInsets = textContainerInsets;
|
|
340
340
|
super.textContainerInset = NSMakeSize(MIN(textContainerInsets.left, textContainerInsets.right), MIN(textContainerInsets.top, textContainerInsets.bottom));
|
|
341
|
+
|
|
342
|
+
if (self.shouldDrawInsertionPoint) {
|
|
343
|
+
[self updateInsertionPointStateAndRestartTimer:NO];
|
|
344
|
+
}
|
|
341
345
|
}
|
|
342
346
|
|
|
343
347
|
#endif // ]TODO(macOS GH#774)
|
|
@@ -141,11 +141,27 @@
|
|
|
141
141
|
|
|
142
142
|
- (void)setTextContainerInset:(UIEdgeInsets)textContainerInset
|
|
143
143
|
{
|
|
144
|
+
if (UIEdgeInsetsEqualToEdgeInsets(textContainerInset, _textContainerInset)) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
144
148
|
_textContainerInset = textContainerInset;
|
|
145
149
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
146
150
|
[self setNeedsLayout];
|
|
147
151
|
#else // [TODO(macOS GH#774)
|
|
148
152
|
((RCTUITextFieldCell*)self.cell).textContainerInset = _textContainerInset;
|
|
153
|
+
|
|
154
|
+
if (self.currentEditor) {
|
|
155
|
+
NSRange selectedRange = self.currentEditor.selectedRange;
|
|
156
|
+
|
|
157
|
+
// Relocate the NSTextView without changing the selection.
|
|
158
|
+
[self.cell selectWithFrame:self.bounds
|
|
159
|
+
inView:self
|
|
160
|
+
editor:self.currentEditor
|
|
161
|
+
delegate:self
|
|
162
|
+
start:selectedRange.location
|
|
163
|
+
length:selectedRange.length];
|
|
164
|
+
}
|
|
149
165
|
#endif // ]TODO(macOS GH#774)
|
|
150
166
|
}
|
|
151
167
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
11
11
|
#import <UIKit/UIGestureRecognizerSubclass.h>
|
|
12
12
|
#endif // ]TODO(macOS GH#774)
|
|
13
|
+
#import <React/RCTUITextField.h> // TODO(macOS GH#774)
|
|
13
14
|
|
|
14
15
|
#import "RCTAssert.h"
|
|
15
16
|
#import "RCTBridge.h"
|
|
@@ -134,6 +135,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)coder)
|
|
|
134
135
|
_shouldSendMouseUpOnSystemBehalf = [(NSControl*)targetView isEnabled];
|
|
135
136
|
} else if ([targetView isKindOfClass:[NSText class]]) {
|
|
136
137
|
_shouldSendMouseUpOnSystemBehalf = [(NSText*)targetView isSelectable];
|
|
138
|
+
}
|
|
139
|
+
else if ([targetView.superview isKindOfClass:[RCTUITextField class]]) {
|
|
140
|
+
_shouldSendMouseUpOnSystemBehalf = [(RCTUITextField*)targetView.superview isSelectable];
|
|
137
141
|
} else {
|
|
138
142
|
_shouldSendMouseUpOnSystemBehalf = NO;
|
|
139
143
|
}
|
package/React/Base/RCTVersion.m
CHANGED
package/package.json
CHANGED