From 397d294f41d765ce55a19032699f777fcabb8d67 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 24 Jun 2021 15:58:11 +0200 Subject: [PATCH] Prevent default on skooma event listeners --- skooma.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skooma.js b/skooma.js index ce3c77d..1de807f 100644 --- a/skooma.js +++ b/skooma.js @@ -31,7 +31,7 @@ const parseArgs = (element, args) => { else for (let key in arg) if (typeof arg[key] == "function") - element.addEventListener(key.replace(/^on[A-Z]/, x => x.charAt(x.length-1).toLowerCase()), arg[key]) + element.addEventListener(key.replace(/^on[A-Z]/, x => x.charAt(x.length-1).toLowerCase()), e => e.preventDefault() || arg[key](e)) else element.setAttribute(key, parseAttribute(arg[key])) }