phoenix_live_view 1.1.26 → 1.1.27

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.
@@ -407,7 +407,10 @@ export default class DOMPatch {
407
407
  portalCallbacks.push(() => this.teleport(toEl, morph));
408
408
  // for the magicId optimization we need to ensure that the template contents
409
409
  // are properly updated as they are used when restoring a cloned tree
410
- fromEl.innerHTML = toEl.innerHTML;
410
+ // Note: we can't write fromEl.innerHTML = toEl.innerHTML because in Chrome
411
+ // the HTML parser would drop nested forms, even when it should not.
412
+ // https://issues.chromium.org/issues/490290430
413
+ fromEl.content.replaceChildren(toEl.content.cloneNode(true));
411
414
  return false;
412
415
  }
413
416
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phoenix_live_view",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "The Phoenix LiveView JavaScript client.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2516,7 +2516,7 @@ var DOMPatch = class {
2516
2516
  dom_default.copyPrivates(toEl, fromEl);
2517
2517
  if (dom_default.isPortalTemplate(toEl)) {
2518
2518
  portalCallbacks.push(() => this.teleport(toEl, morph));
2519
- fromEl.innerHTML = toEl.innerHTML;
2519
+ fromEl.content.replaceChildren(toEl.content.cloneNode(true));
2520
2520
  return false;
2521
2521
  }
2522
2522
  if (isFocusedFormEl && fromEl.type !== "hidden" && !focusedSelectChanged) {
@@ -5934,7 +5934,7 @@ var LiveSocket = class {
5934
5934
  }
5935
5935
  // public
5936
5936
  version() {
5937
- return "1.1.26";
5937
+ return "1.1.27";
5938
5938
  }
5939
5939
  isProfileEnabled() {
5940
5940
  return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";