Skip to content

Commit

Permalink
Merge branch 'master' into amgleitman/0.64-merge-2020-10-14
Browse files Browse the repository at this point in the history
  • Loading branch information
amgleitman committed Oct 4, 2021
2 parents a0208c7 + c1e4375 commit 7414a7d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 48 deletions.
4 changes: 2 additions & 2 deletions Libraries/Components/Pressable/Pressable.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ function Pressable(props: Props, forwardedRef): React.Node {
...restProps,
...android_rippleConfig?.viewProps,
acceptsFirstMouse: acceptsFirstMouse !== false && !disabled, // [TODO(macOS GH#774)
enableFocusRing: enableFocusRing !== false && !disabled, // ]TODO(macOS GH#774)
enableFocusRing: enableFocusRing !== false && !disabled,
accessible: accessible !== false,
focusable: focusable !== false,
focusable: focusable !== false && !disabled, // ]TODO(macOS GH#774)
hitSlop,
};

Expand Down
5 changes: 1 addition & 4 deletions Libraries/Components/Touchable/TouchableBounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ class TouchableBounce extends React.Component<Props, State> {
!this.props.disabled,
}
: {
focusable:
this.props.focusable !== false &&
this.props.onPress !== undefined &&
!this.props.disabled,
focusable: this.props.focusable !== false && !this.props.disabled,
})}
// macOS]
tooltip={this.props.tooltip} // TODO(macOS/win GH#774)
Expand Down
4 changes: 1 addition & 3 deletions Libraries/Components/Touchable/TouchableHighlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ class TouchableHighlight extends React.Component<Props, State> {
!this.props.disabled,
}
: {
focusable:
this.props.focusable !== false &&
this.props.onPress !== undefined,
focusable: this.props.focusable !== false && !this.props.disabled,
})}
// macOS]
tooltip={this.props.tooltip} // TODO(macOS/win GH#774)
Expand Down
4 changes: 1 addition & 3 deletions Libraries/Components/Touchable/TouchableOpacity.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ class TouchableOpacity extends React.Component<Props, State> {
!this.props.disabled,
}
: {
focusable:
this.props.focusable !== false &&
this.props.onPress !== undefined,
focusable: this.props.focusable !== false && !this.props.disabled,
})}
// macOS]
tooltip={this.props.tooltip} // TODO(macOS/win GH#774)
Expand Down
4 changes: 1 addition & 3 deletions Libraries/Components/Touchable/TouchableWithoutFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ class TouchableWithoutFeedback extends React.Component<Props, State> {
this.props.acceptsKeyboardFocus === true && !this.props.disabled,
}
: {
focusable:
this.props.focusable !== false &&
this.props.onPress !== undefined,
focusable: this.props.focusable !== false && !this.props.disabled,
}),
// macOS]
enableFocusRing:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`TouchableHighlight renders correctly 1`] = `
acceptsFirstMouse={true}
accessible={true}
enableFocusRing={true}
focusable={false}
focusable={true}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"scripts/react-native-xcode.sh",
"template.config.js",
"template",
"third-party-podspecs"
"third-party-podspecs",
"android"
],
"scripts": {
"start": "react-native start",
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ SPEC CHECKSUMS:
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d
glog: b0ffa5c7cbb8a2c455ee70cc920fe61694d43248
glog: 0dc7efada961c0793012970b60faebbd58b0decb
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
RCT-Folly: 2f2111690f1e23490285c059ca53be22fe6d6bee
RCTRequired: 892b1fc61efc4f66a92b9c6ca85e2522e051f0e2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,30 +111,6 @@ class FocusTrapExample extends React.Component<{}> {
}
}

class FocusRingExample extends React.Component<{}> {
render() {
return (
<View>
<View style={styles.keyView} focusable={true} enableFocusRing={true}>
<Text>Enabled</Text>
</View>
<View style={styles.keyView} focusable={true} enableFocusRing={false}>
<Text>Disabled</Text>
</View>
<View style={styles.keyView} focusable={true}>
<Text>Default</Text>
</View>
<View style={styles.keyView} focusable={false}>
<Text>Not focusable</Text>
</View>
<View style={styles.keyView} focusable={true} enableFocusRing={true}>
<Text>Enabled</Text>
</View>
</View>
);
}
}

var styles = StyleSheet.create({
textInput: {
...Platform.select({
Expand Down Expand Up @@ -174,10 +150,4 @@ exports.examples = [
return <FocusTrapExample />;
},
},
{
title: 'Focus Ring Example',
render: function(): React.Element<any> {
return <FocusRingExample />;
},
},
];

0 comments on commit 7414a7d

Please sign in to comment.