jsf.js_next_gen 4.0.3-beta.4 → 4.0.3-beta.5

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.
@@ -6508,12 +6508,17 @@ var ExtLang;
6508
6508
  return foundForm;
6509
6509
  }
6510
6510
  }
6511
+ //no direct form is found we look for parent/child relationships as fallback
6512
+ //(90% case)
6511
6513
  let form = queryElem.firstParent(Const_1.HTML_TAG_FORM)
6512
6514
  .orElseLazy(() => queryElem.byTagName(Const_1.HTML_TAG_FORM, true))
6513
6515
  .orElseLazy(() => eventTarget.firstParent(Const_1.HTML_TAG_FORM))
6514
6516
  .orElseLazy(() => eventTarget.byTagName(Const_1.HTML_TAG_FORM))
6515
- .orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM))
6516
6517
  .first();
6518
+ //either a form is found within parent child - nearest form (aka first)
6519
+ //or we look for a single form
6520
+ form = form.orElseLazy(() => mona_dish_1.DQ.byTagName(Const_1.HTML_TAG_FORM));
6521
+ //the end result must be a found form otherwise - Exception
6517
6522
  assertOnlyOneFormExists(form);
6518
6523
  return form;
6519
6524
  }