Skip to content

Commit eb861d7

Browse files
committed
Implement isKeyboardFocusable
1 parent 1621bc4 commit eb861d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/react-native/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ class ConcreteViewShadowNode : public ConcreteShadowNode<
118118
BaseShadowNode::orderIndex_ = 0;
119119
}
120120

121-
#if !TARGET_OS_OSX // [macOS]
122121
bool isKeyboardFocusable =
123122
HostPlatformViewTraitsInitializer::isKeyboardFocusable(props) ||
124123
props.accessible;
@@ -128,7 +127,6 @@ class ConcreteViewShadowNode : public ConcreteShadowNode<
128127
} else {
129128
BaseShadowNode::traits_.unset(ShadowNodeTraits::Trait::KeyboardFocusable);
130129
}
131-
#endif // [macOS]
132130
}
133131
};
134132

packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/HostPlatformViewTraitsInitializer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ inline bool formsView(const ViewProps& props) {
2323
return props.focusable;
2424
}
2525

26+
inline bool isKeyboardFocusable(const ViewProps& props) {
27+
return props.focusable;
28+
}
29+
2630
} // namespace facebook::react::HostPlatformViewTraitsInitializer

0 commit comments

Comments
 (0)