gyosjs 0.2.3 → 0.2.4

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.
package/dist/gyos.auto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GyosJS v0.2.3
2
+ * GyosJS v0.2.4
3
3
  * (c) 2026
4
4
  * @license MIT
5
5
  */
@@ -3268,8 +3268,8 @@
3268
3268
 
3269
3269
  const managedForms = new WeakSet();
3270
3270
  const approvedSubmissions = new WeakSet();
3271
- // Coordinates the validation listener on a form with the Router's earlier
3272
- // document-capture listener without exposing state on application elements.
3271
+ // Coordinates the form capture validator with the Router's document listener
3272
+ // without exposing state on application elements.
3273
3273
  function registerValidatedForm(form) {
3274
3274
  managedForms.add(form);
3275
3275
  }
@@ -3419,7 +3419,6 @@
3419
3419
  const submitListener = async (e) => {
3420
3420
  if (replayingSubmission) {
3421
3421
  replayingSubmission = false;
3422
- cancelApprovedFormSubmission(form);
3423
3422
  return;
3424
3423
  }
3425
3424
  e.preventDefault();
@@ -3450,11 +3449,11 @@
3450
3449
  }
3451
3450
  finally {
3452
3451
  // requestSubmit dispatches synchronously. If native validation or
3453
- // another capture listener stopped it, do not leak approval state.
3452
+ // another listener stopped it, do not leak approval state.
3454
3453
  if (replayingSubmission) {
3455
3454
  replayingSubmission = false;
3456
- cancelApprovedFormSubmission(form);
3457
3455
  }
3456
+ cancelApprovedFormSubmission(form);
3458
3457
  }
3459
3458
  }, 0);
3460
3459
  return;
@@ -7444,8 +7443,8 @@
7444
7443
  if (progressBarEnabled) {
7445
7444
  progressBar = new ProgressBar(progressBarEnabled);
7446
7445
  }
7447
- document.addEventListener('click', onClickCapture, true);
7448
- document.addEventListener('submit', onSubmitCapture, true);
7446
+ document.addEventListener('click', onClick);
7447
+ document.addEventListener('submit', onSubmit);
7449
7448
  document.addEventListener('mouseover', onMouseOverCapture, true);
7450
7449
  window.addEventListener('popstate', onPopState);
7451
7450
  if ('scrollRestoration' in history) {
@@ -8116,7 +8115,7 @@
8116
8115
  return; // this case not link (tag a) or form so do nothing
8117
8116
  }
8118
8117
  }
8119
- function onClickCapture(event) {
8118
+ function onClick(event) {
8120
8119
  if (event.defaultPrevented)
8121
8120
  return;
8122
8121
  if (event.button !== 0)
@@ -8173,7 +8172,9 @@
8173
8172
  return;
8174
8173
  preload(url.toString());
8175
8174
  }
8176
- function onSubmitCapture(event) {
8175
+ function onSubmit(event) {
8176
+ if (event.defaultPrevented)
8177
+ return;
8177
8178
  const form = event.target;
8178
8179
  if (!form || form.tagName.toLowerCase() !== 'form')
8179
8180
  return;
@@ -8299,7 +8300,7 @@
8299
8300
  onAfterNavigate,
8300
8301
  portalCreate,
8301
8302
  portalDestroy,
8302
- version: '0.2.3'
8303
+ version: '0.2.4'
8303
8304
  };
8304
8305
 
8305
8306
  var _a, _b, _c;