react-native-macos 0.68.46 → 0.68.47

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.
@@ -16,6 +16,6 @@
16
16
  exports.version = {
17
17
  major: 0,
18
18
  minor: 68,
19
- patch: 46,
19
+ patch: 47,
20
20
  prerelease: null,
21
21
  };
@@ -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
  }
@@ -27,7 +27,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
27
27
  __rnVersion = @{
28
28
  RCTVersionMajor: @(0),
29
29
  RCTVersionMinor: @(68),
30
- RCTVersionPatch: @(46),
30
+ RCTVersionPatch: @(47),
31
31
  RCTVersionPrerelease: [NSNull null],
32
32
  };
33
33
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.68.46
1
+ VERSION_NAME=0.68.47
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -21,6 +21,6 @@ public class ReactNativeVersion {
21
21
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
22
22
  "major", 0,
23
23
  "minor", 68,
24
- "patch", 46,
24
+ "patch", 47,
25
25
  "prerelease", null);
26
26
  }
@@ -21,7 +21,7 @@ namespace facebook::react {
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 68;
24
- int32_t Patch = 46;
24
+ int32_t Patch = 47;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.68.46",
3
+ "version": "0.68.47",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "react": "17.0.2",
15
- "react-native-macos": "0.68.46"
15
+ "react-native-macos": "0.68.47"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/core": "^7.12.9",