altcha 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6074,7 +6074,7 @@ function Widget($$anchor, $$props) {
6074
6074
  }
6075
6075
  });
6076
6076
  onMount(() => {
6077
- log("mounted", "3.0.7");
6077
+ log("mounted", "3.0.8");
6078
6078
  if (instance) {
6079
6079
  globalThis.$altcha.instances.add(instance);
6080
6080
  }
@@ -6347,10 +6347,14 @@ function Widget($$anchor, $$props) {
6347
6347
  reset$1();
6348
6348
  }
6349
6349
  function onFormSubmit(ev) {
6350
- set(elSubmitter, ev.submitter, true);
6350
+ const target = ev.target;
6351
+ if (target?.getAttribute("data-code-challenge") === "true") {
6352
+ return;
6353
+ }
6351
6354
  if (get(auto) === "onsubmit" && get(currentState) === State.UNVERIFIED) {
6352
6355
  ev.preventDefault();
6353
6356
  ev.stopPropagation();
6357
+ set(elSubmitter, ev.submitter, true);
6354
6358
  show();
6355
6359
  verify().then((result) => {
6356
6360
  if (result && !get(codeChallenge)) {