react-native-macos 0.66.78 → 0.66.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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTView.m +3 -0
- package/React/Views/UIView+React.h +2 -0
- package/React/Views/UIView+React.m +22 -13
- 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
package/React/Base/RCTVersion.m
CHANGED
package/React/Views/RCTView.m
CHANGED
|
@@ -789,6 +789,9 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
789
789
|
name:NSViewBoundsDidChangeNotification
|
|
790
790
|
object:[[self enclosingScrollView] contentView]];
|
|
791
791
|
}
|
|
792
|
+
|
|
793
|
+
[self reactViewDidMoveToWindow]; // TODO(macOS GH#1412)
|
|
794
|
+
|
|
792
795
|
[super viewDidMoveToWindow];
|
|
793
796
|
}
|
|
794
797
|
|
|
@@ -270,18 +270,17 @@
|
|
|
270
270
|
}
|
|
271
271
|
#endif // TODO(macOS GH#774)
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
*/
|
|
276
|
-
- (BOOL)reactIsFocusNeeded
|
|
273
|
+
// [TODO(macOS GH#1412)
|
|
274
|
+
- (void)reactViewDidMoveToWindow
|
|
277
275
|
{
|
|
278
|
-
|
|
276
|
+
[self reactFocusIfNeeded];
|
|
279
277
|
}
|
|
278
|
+
// TODO(macOS GH#1412)]
|
|
280
279
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Focus manipulation.
|
|
282
|
+
*/
|
|
283
|
+
static __weak RCTPlatformView *_pendingFocusView; // TODO(macOS GH#1412)
|
|
285
284
|
|
|
286
285
|
- (void)reactFocus
|
|
287
286
|
{
|
|
@@ -290,19 +289,23 @@
|
|
|
290
289
|
#else
|
|
291
290
|
if (![self becomeFirstResponder]) {
|
|
292
291
|
#endif //// TODO(macOS GH#774)]
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
// [TODO(macOS GH#1412)
|
|
293
|
+
_pendingFocusView = self;
|
|
294
|
+
} else {
|
|
295
|
+
_pendingFocusView = nil;
|
|
296
|
+
}
|
|
297
|
+
// TODO(macOS GH#1412)]
|
|
295
298
|
}
|
|
296
299
|
|
|
297
300
|
- (void)reactFocusIfNeeded
|
|
298
301
|
{
|
|
299
|
-
if (self
|
|
302
|
+
if ([self isEqual:_pendingFocusView]) { // TODO(macOS GH#1412)
|
|
300
303
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
301
304
|
if ([[self window] makeFirstResponder:self]) {
|
|
302
305
|
#else
|
|
303
306
|
if ([self becomeFirstResponder]) {
|
|
304
307
|
#endif // TODO(macOS GH#774)]
|
|
305
|
-
|
|
308
|
+
_pendingFocusView = nil; // TODO(macOS GH#1412)
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
311
|
}
|
|
@@ -316,6 +319,12 @@
|
|
|
316
319
|
#else
|
|
317
320
|
[self resignFirstResponder];
|
|
318
321
|
#endif // TODO(macOS GH#774)]
|
|
322
|
+
|
|
323
|
+
// [TODO(macOS GH#1412)
|
|
324
|
+
if ([self isEqual:_pendingFocusView]) {
|
|
325
|
+
_pendingFocusView = nil;
|
|
326
|
+
}
|
|
327
|
+
// TODO(macOS GH#1412)]
|
|
319
328
|
}
|
|
320
329
|
|
|
321
330
|
#pragma mark - Layout
|
package/package.json
CHANGED