Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Page freaks out when tapping on Google credit card autocomplete #61

Open
MattiaCostamagna opened this issue Mar 17, 2020 · 0 comments
Open

Comments

@MattiaCostamagna
Copy link

Hi,

I'm using your library for an app I'm developing and I noticed that if I tap on the autofill option shown below the field (see screenshot below), the page starts freaking out after Google asks me to enter the CVC.

photo_2020-03-17_17-04-42(1)

The app basically starts opening and closing the keyboard and quickly moves the focus between the credit card fields and I'm forced to change screen.

My code that handles the credit card input is pretty simple, and I haven't specified many props:

class ChargeStripe extends React.Component {
	constructor(props) {
		super(props);
		this.state = {
			// ...
		};
		// stuff
	}

	// methods

	render() {
		if (!this.props.show) {
			return null;
		}
		return (
			<React.Fragment>
				<View
					style={{
						backgroundColor: White,
						shadowColor: Black,
						shadowOffset: {
							width: 0,
							height: 1
						},
						shadowOpacity: 0.22,
						shadowRadius: 2.22,
						elevation: 1,
						borderRadius: heightPercentageToDP(1),
						padding: heightPercentageToDP(1)
					}}
				>
					<LiteCreditCardInput onChange={this.fieldChanged} validColor={Teal600} invalidColor={Red800} />
				</View>
				<PayBtn
					styles={this.props.styles}
					processing={this.props.processing}
					submit={() => this.props.submit(this.generateToken)}
					error={this.props.error}
					disabled={!this.state.valid}
				/>
			</React.Fragment>
		);
	}
}

I noticed that if I change LiteCreditCardInput with CreditCardInput nothing changes and the problem is still there.

Can you help me solve this problem?
Thanks a lot in advance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant