react-native-macos 0.68.13 → 0.68.16
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/RCTMultilineTextInputView.m +10 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +4 -1
- package/React/Base/RCTUIKit.h +2 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/macOS/RCTUIKit.m +13 -0
- 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
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
#else // [TODO(macOS GH#774)
|
|
49
49
|
_scrollView.documentView = _backedTextInputView;
|
|
50
50
|
_scrollView.contentView.postsBoundsChangedNotifications = YES;
|
|
51
|
+
// Enable focus ring by default
|
|
52
|
+
_scrollView.enableFocusRing = YES;
|
|
51
53
|
[self addSubview:_scrollView];
|
|
52
54
|
|
|
53
55
|
// a register for those notifications on the content view.
|
|
@@ -89,6 +91,14 @@
|
|
|
89
91
|
_scrollView.frame = UIEdgeInsetsInsetRect(self.bounds, reactBorderInsets);
|
|
90
92
|
[self setNeedsLayout];
|
|
91
93
|
}
|
|
94
|
+
|
|
95
|
+
- (void)setEnableFocusRing:(BOOL)enableFocusRing {
|
|
96
|
+
[super setEnableFocusRing:enableFocusRing];
|
|
97
|
+
if ([_scrollView respondsToSelector:@selector(setEnableFocusRing:)]) {
|
|
98
|
+
[_scrollView setEnableFocusRing:YES];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
92
102
|
#endif // ]TODO(macOS GH#774)
|
|
93
103
|
|
|
94
104
|
#pragma mark - UIScrollViewDelegate
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
106
106
|
[self setBordered:NO];
|
|
107
107
|
[self setAllowsEditingTextAttributes:YES];
|
|
108
|
-
[self setAccessibilityRole:NSAccessibilityTextFieldRole];
|
|
109
108
|
[self setBackgroundColor:[NSColor clearColor]];
|
|
110
109
|
#endif // ]TODO(macOS GH#774)
|
|
111
110
|
|
|
@@ -127,7 +126,11 @@
|
|
|
127
126
|
|
|
128
127
|
#pragma mark - Accessibility
|
|
129
128
|
|
|
129
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
130
130
|
- (void)setIsAccessibilityElement:(BOOL)isAccessibilityElement
|
|
131
|
+
#else
|
|
132
|
+
- (void)setAccessibilityElement:(BOOL)isAccessibilityElement
|
|
133
|
+
#endif // ]TODO(macOS GH#774)
|
|
131
134
|
{
|
|
132
135
|
// UITextField is accessible by default (some nested views are) and disabling that is not supported.
|
|
133
136
|
// On iOS accessible elements cannot be nested, therefore enabling accessibility for some container view
|
package/React/Base/RCTUIKit.h
CHANGED
|
@@ -425,6 +425,8 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
|
|
|
425
425
|
@property (nonatomic, assign) CGFloat zoomScale;
|
|
426
426
|
@property (nonatomic, assign) BOOL alwaysBounceHorizontal;
|
|
427
427
|
@property (nonatomic, assign) BOOL alwaysBounceVertical;
|
|
428
|
+
// macOS specific properties
|
|
429
|
+
@property (nonatomic, assign) BOOL enableFocusRing;
|
|
428
430
|
|
|
429
431
|
@end
|
|
430
432
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -429,6 +429,19 @@ static RCTUIView *RCTUIViewCommonInit(RCTUIView *self)
|
|
|
429
429
|
|
|
430
430
|
@implementation RCTUIScrollView // TODO(macOS ISS#3536887)
|
|
431
431
|
|
|
432
|
+
- (void)setEnableFocusRing:(BOOL)enableFocusRing {
|
|
433
|
+
if (_enableFocusRing != enableFocusRing) {
|
|
434
|
+
_enableFocusRing = enableFocusRing;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (enableFocusRing) {
|
|
438
|
+
// NSTextView has no focus ring by default so let's use the standard Aqua focus ring.
|
|
439
|
+
[self setFocusRingType:NSFocusRingTypeExterior];
|
|
440
|
+
} else {
|
|
441
|
+
[self setFocusRingType:NSFocusRingTypeNone];
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
432
445
|
// UIScrollView properties missing from NSScrollView
|
|
433
446
|
- (CGPoint)contentOffset
|
|
434
447
|
{
|
package/package.json
CHANGED