fix: preventing double clicks for the checkboxes#110
fix: preventing double clicks for the checkboxes#110duranmla merged 2 commits intofreenowtech:mainfrom
Conversation
|
Thanks for contributing. I could think of a few scenarios, which we need to make sure to still work.
|
|
@snapsnapturtle looks like the keyboard interactions still work: https://www.loom.com/share/65c1d685b4eb4f768a6724f0d6ac3c75
|
|
Can you describe what was the issue you had? It is expected that the |
|
Sure. So the issue was that we were registering two clicks when we clicked on checkboxes, one for the If there is a usecase for emitting click on the label, then I suppose we needn't prevent it from bubbling up, but in my opinion because this is a checkbox, this should be the default behavior (we want only one click when we click on a checkbox, even on its label, instead of two, because its supposed to be one cohesive unit that works as an |
|
I think this totally makes sense and it is related to #23 isn't? |
|
You can technically check it using your keyboard (like I showed in the video above), but its tricky |
|
Why is tricky @lloydaf ? cause we don't have the focus or because you have to press multiple times the keyboard? |
|
It's tricky because there's no square box around the checkbox, and so you have to guess if your tab is at the right position. I don't know if that's the focus issue you're talking about but you can verify what I am saying from the video above, no outline when we reach the checkpoint anchors |
### [1.4.2](v1.4.1...v1.4.2) (2021-06-11) ### Bug Fixes * **checkbox:** preventing one click trigger twice. one input one for text ([#110](#110)) ([6a1c739](6a1c739))
|
🎉 This PR is included in version 1.4.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
This PR intends to fix an issue with checkboxes, where two clicks are registered instead of one
Why:
This was causing weird behavior with Google Tag Manager data capturing, and so I decided to investigate. The issue seems to be because of a click being registered on the inner
TextcomponentHow:
Prevent the event from being propogated in order to fix this issue
Media:
https://www.loom.com/share/05dffc1f667d435b9bfdbba4c3dd1ee7
Checklist: