phoenix_live_view 1.0.13 → 1.0.14

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.
@@ -4664,6 +4664,7 @@ var View = class _View {
4664
4664
  const phxEvent = newForm.getAttribute(this.binding(PHX_AUTO_RECOVER)) || newForm.getAttribute(this.binding("change"));
4665
4665
  const inputs = Array.from(oldForm.elements).filter((el) => dom_default.isFormInput(el) && el.name && !el.hasAttribute(phxChange));
4666
4666
  if (inputs.length === 0) {
4667
+ callback();
4667
4668
  return;
4668
4669
  }
4669
4670
  inputs.forEach((input2) => input2.hasAttribute(PHX_UPLOAD_REF) && LiveUploader.clearFiles(input2));
@@ -4715,7 +4716,16 @@ var View = class _View {
4715
4716
  return {};
4716
4717
  }
4717
4718
  let phxChange = this.binding("change");
4718
- return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id).filter((form) => form.elements.length > 0).filter((form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== "ignore").map((form) => form.cloneNode(true)).reduce((acc, form) => {
4719
+ return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id).filter((form) => form.elements.length > 0).filter((form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== "ignore").map((form) => {
4720
+ const clonedForm = form.cloneNode(false);
4721
+ dom_default.copyPrivates(clonedForm, form);
4722
+ Array.from(form.elements).forEach((el) => {
4723
+ const clonedEl = el.cloneNode(false);
4724
+ dom_default.copyPrivates(clonedEl, el);
4725
+ clonedForm.appendChild(clonedEl);
4726
+ });
4727
+ return clonedForm;
4728
+ }).reduce((acc, form) => {
4719
4729
  acc[form.id] = form;
4720
4730
  return acc;
4721
4731
  }, {});
@@ -4827,7 +4837,7 @@ var LiveSocket = class {
4827
4837
  }
4828
4838
  // public
4829
4839
  version() {
4830
- return "1.0.13";
4840
+ return "1.0.14";
4831
4841
  }
4832
4842
  isProfileEnabled() {
4833
4843
  return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";