casesandberg / casesandberg/react-color
How to stop event propagation?
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
Hello! Thanks for a great package.
I'm wondering if there is a way to stop event propagation on inputs?
I have `document.addEventListener` in my application, which deletes items on `DEL` etc. In all my other inputs I do the following to prevent this behavior when modifying input:
` event.stopPropagation();`
`event.nativeEvent.stopPropagation();`
`event.nativeEvent.stopImmediatePropagation();`
I briefly looked through the code, and it doesn't seem like you pass the event to `onChange`?
`onChange?: ColorChangeHandler;`
`export type ColorChangeHandler = (color: ColorResult) => void;`
How do I achieve what I want? Here is a [codesandbox](https://codesandbox.io/s/laughing-kalam-5r09c?file=/src/App.js) reproducing my issue.
Contributor guide
Assessment
This issue has not been assessed yet.