Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Libraries/Components/View/ReactNativeViewAttributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const UIView = {
validKeysDown: true,
validKeysUp: true,
draggedTypes: true,
nextKeyViewTag: true,
// macOS]
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const ReactNativeViewViewConfigMacOS = {
accessibilityTraits: true,
draggedTypes: true,
enableFocusRing: true,
nextKeyViewTag: true,
onBlur: true,
onClick: true,
onDoubleClick: true,
Expand Down
7 changes: 0 additions & 7 deletions Libraries/Components/View/ViewPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,6 @@ type MacOSViewProps = $ReadOnly<{|
*/
acceptsFirstMouse?: ?boolean,

/**
* The react tag of the view that follows the current view in the key view loop.
*
* @platform macos
*/
nextKeyViewTag?: ?number,

/**
* Specifies whether focus ring should be drawn when the view has the first responder status.
*
Expand Down
1 change: 0 additions & 1 deletion Libraries/NativeComponent/PlatformBaseViewConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName =
cursor: true,
draggedTypes: true,
enableFocusRing: true,
nextKeyViewTag: true,
tooltip: true,
validKeysDown: true,
validKeysUp: true,
Expand Down
31 changes: 0 additions & 31 deletions React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#import "RCTConvert.h"
#import "RCTLog.h"
#import "RCTShadowView.h"
#import "RCTSinglelineTextInputView.h" // [macOS]
#import "RCTUIManager.h"
#import "RCTUIManagerUtils.h"
#import "RCTUtils.h"
Expand Down Expand Up @@ -498,36 +497,6 @@ - (RCTShadowView *)shadowView
RCT_EXPORT_VIEW_PROPERTY(onKeyUp, RCTDirectEventBlock) // macOS keyboard events
RCT_EXPORT_VIEW_PROPERTY(validKeysDown, NSArray<NSString*>)
RCT_EXPORT_VIEW_PROPERTY(validKeysUp, NSArray<NSString*>)
RCT_CUSTOM_VIEW_PROPERTY(nextKeyViewTag, NSNumber, RCTView)
{
NSNumber *nextKeyViewTag = [RCTConvert NSNumber:json];

RCTUIManager *uiManager = [[self bridge] uiManager];
NSView *nextKeyView = [uiManager viewForReactTag:nextKeyViewTag];
if (nextKeyView) {
NSView *targetView = view;
// The TextInput component is implemented as a RCTUITextField wrapped by a RCTSinglelineTextInputView,
// so we need to get the first subview to properly transfer focus
if ([targetView isKindOfClass:[RCTSinglelineTextInputView class]]) {
targetView = [[view subviews] firstObject];
}
if ([nextKeyView isKindOfClass:[RCTSinglelineTextInputView class]]) {
nextKeyView = [[nextKeyView subviews] firstObject];
}
[targetView setNextKeyView:nextKeyView];
}
}

RCT_EXPORT_METHOD(recalculateKeyViewLoop: (nonnull NSNumber *)reactTag)
{
[self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIView *> *viewRegistry) {
RCTUIView *view = viewRegistry[reactTag];
if (!view) {
RCTLogError(@"Cannot find NativeView with tag #%@", reactTag);
}
[[view window] recalculateKeyViewLoop];
}];
}
#endif // macOS]

#pragma mark - ShadowView properties
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions packages/rn-tester/js/utils/RNTesterList.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ const Components: Array<RNTesterModuleInfo> = [
key: 'KeyboardEvents',
module: require('../examples/KeyboardEventsExample/KeyboardEventsExample'),
},
{
key: 'Key-View Accessibility Looping',
module: require('../examples/KeyViewLoopExample/KeyViewLoopExample'),
},
{
key: 'AccessibilityShowMenu',
module: require('../examples/AccessibilityShowMenu/AccessibilityShowMenu'),
Expand Down