dequelabs / dequelabs/cauldron

Checkbox capture event propagation

Open
#692 0 comments 0 reactions 0 assignees View on GitHub
info needed
Dominant language
TypeScript
Stars
127
Forks
31
Avg merge
2d 12h
Merged PRs (30d)
8

Description

The only way to prevent a Checkbox event from propagating up to a parent is to use `onChangeCapture={(e) => e.stopPropagation}`, but using that prevents it from being activated with space.

2 events firing due to propagation to parent element (table row) with `onChangeCapture={(e) => e.stopPropagation}` commented out:
![Screen Shot 2022-07-06 at 12 46 36 PM](https://user-images.githubusercontent.com/99676396/177603408-74fce59d-52b4-464e-a2ef-2e2163f0f8d1.png)

1 event firing with `onChangeCapture={(e) => e.stopPropagation}`:
![Screen Shot 2022-07-06 at 12 46 46 PM](https://user-images.githubusercontent.com/99676396/177603411-06c5696f-8471-4016-86eb-79847ace465f.png)

2 events firing due to propagation to parent element (table row) with `onChangeCapture={(e) => e.stopPropagation}` commented out, able to interact with the Checkbox using space:

https://user-images.githubusercontent.com/99676396/177603536-6b9b0b58-2538-45a2-8b1a-a7236d8da595.mov

1 event firing with `onChangeCapture={(e) => e.stopPropagation}`, unable to interact with the Checkbox using space:

https://user-images.githubusercontent.com/99676396/177603539-2410d471-22e9-49f8-9971-73792efb4696.mov

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.