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

Double click on "Yes it's safe" breaks whole app - Closes #642 #697

Merged
merged 2 commits into from
Apr 6, 2018

Conversation

yasharAyari
Copy link
Contributor

What was the problem?

As title suggests if we double clicked Yes it's safe button in Registration process, the component throwed error.

How did I fix it?

Disable the button after first click.

How to test it?

Review checklist

Copy link
Contributor

@reyraa reyraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Yashar

@alepop
Copy link
Contributor

alepop commented Apr 6, 2018

@yasharAyari hello! I think, there are a lot of place in the app, then you need to prevent double click, maybe better is to make a HOC component for click elements, that will allow only one click.

@reyraa
Copy link
Contributor

reyraa commented Apr 6, 2018

@alepop Correct. thanks for your suggestion. we can create an HOC for all buttons presenting double click event. I'll create a ticket to fix it with next release.

@yasharAyari
Copy link
Contributor Author

@alepop I don't agree with you . I think we can handle all of them with 'disabled' property in button component like this one.

@yasharAyari yasharAyari merged commit cdf7add into 0.4.0 Apr 6, 2018
@alepop
Copy link
Contributor

alepop commented Apr 6, 2018

@yasharAyari you can create a HOC that will set the disabled attribute automatically on the first click. In my opinion, it is better than add all this code in each component.

@slaweet slaweet deleted the 642-double-click-on-yes-its-safe-breaks-app branch April 9, 2018 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants