Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary focus on the Add payment method button #9348

Merged
merged 10 commits into from
Jun 14, 2022
4 changes: 4 additions & 0 deletions src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ class Button extends Component {
return (
<Pressable
onPress={(e) => {
if (e && e.type === 'click') {
e.currentTarget.blur();
}

if (this.props.shouldEnableHapticFeedback) {
HapticFeedback.trigger();
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ const MenuItem = props => (
return;
}

if (e && e.type === 'click') {
e.currentTarget.blur();
}

props.onPress(e);
}}
style={({hovered, pressed}) => ([
Expand Down