We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a41f9ac commit dbbff28Copy full SHA for dbbff28
src/utils/events.js
@@ -42,8 +42,13 @@ export const eventOnOff = (on, ...args) => {
42
}
43
44
// Utility method to prevent the default event handling and propagation
45
-export const stopEvent = (evt, { propagation = true, immediatePropagation = false } = {}) => {
46
- evt.preventDefault()
+export const stopEvent = (
+ evt,
47
+ { preventDefault = true, propagation = true, immediatePropagation = false } = {}
48
+) => {
49
+ if (preventDefault) {
50
+ evt.preventDefault()
51
+ }
52
if (propagation) {
53
evt.stopPropagation()
54
0 commit comments