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

fix(vwc-button): multiple click events generated on button #1101

Merged
merged 14 commits into from
Oct 20, 2021

Conversation

tveinfeld
Copy link
Contributor

@tveinfeld tveinfeld commented Oct 19, 2021

Expected behavior
When clicking a "submit" vwc-button, it should generate exactly one "click" event

Current behavior
When clicking a "submit" vwc-button, at-least two events are being fired:
Click (button) -> Submit (form) -> Click (button)

VIV-752

@github-actions
Copy link

🚀

Latest successful build of the PR deployed here.

🚀

@tveinfeld tveinfeld requested a review from yinonov October 19, 2021 12:19
@YonatanKra
Copy link
Contributor

The way to solve this would be to create a test that shows the error (e.g. shows we get more than one click) and then create a solution that makes this test pass.
Otherwise, a future developer would come and say: "setTimeout is bad - I'll remove it!" and that's that.

@YonatanKra YonatanKra force-pushed the VIV-754-multiple-click-events-on-button branch from fedea26 to 9fc2a8e Compare October 20, 2021 11:42
@YonatanKra YonatanKra force-pushed the VIV-754-multiple-click-events-on-button branch from 402b525 to 0334990 Compare October 20, 2021 11:49
@yinonov yinonov merged commit ca298b3 into master Oct 20, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tveinfeld tveinfeld deleted the VIV-754-multiple-click-events-on-button branch October 24, 2021 09:22
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