phoenix_live_view 1.1.13 → 1.1.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.
@@ -4294,7 +4294,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
4294
4294
  this.log(type, () => ["", clone(rawDiff)]);
4295
4295
  const { diff, reply, events, title } = Rendered.extract(rawDiff);
4296
4296
  callback({ diff, reply, events });
4297
- if (typeof title === "string" || type == "mount") {
4297
+ if (typeof title === "string" || type == "mount" && this.isMain()) {
4298
4298
  window.requestAnimationFrame(() => dom_default.putTitle(title));
4299
4299
  }
4300
4300
  }
@@ -4556,6 +4556,11 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
4556
4556
  const oldForms = this.root.formsForRecovery;
4557
4557
  const template = document.createElement("template");
4558
4558
  template.innerHTML = html;
4559
+ dom_default.all(template.content, `[${PHX_PORTAL}]`).forEach((portalTemplate) => {
4560
+ template.content.firstElementChild.appendChild(
4561
+ portalTemplate.content.firstElementChild
4562
+ );
4563
+ });
4559
4564
  const rootEl = template.content.firstElementChild;
4560
4565
  rootEl.id = this.id;
4561
4566
  rootEl.setAttribute(PHX_ROOT_ID, this.root.id);
@@ -5654,7 +5659,10 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
5654
5659
  return {};
5655
5660
  }
5656
5661
  const phxChange = this.binding("change");
5657
- return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id).filter((form) => form.elements.length > 0).filter(
5662
+ return dom_default.all(
5663
+ document,
5664
+ `#${CSS.escape(this.id)} form[${phxChange}], [${PHX_TELEPORTED_REF}="${CSS.escape(this.id)}"] form[${phxChange}]`
5665
+ ).filter((form) => form.id).filter((form) => form.elements.length > 0).filter(
5658
5666
  (form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== "ignore"
5659
5667
  ).map((form) => {
5660
5668
  const clonedForm = form.cloneNode(true);
@@ -5811,7 +5819,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
5811
5819
  }
5812
5820
  // public
5813
5821
  version() {
5814
- return "1.1.13";
5822
+ return "1.1.14";
5815
5823
  }
5816
5824
  isProfileEnabled() {
5817
5825
  return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";