phoenix_live_view 1.1.27 → 1.1.28

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.
@@ -193,6 +193,11 @@ export default class View {
193
193
  // bind the view to the element
194
194
  DOM.putPrivate(this.el, "view", this);
195
195
  this.id = this.el.id;
196
+ // destroyViewByEl requires the root set, so we need to set it early
197
+ // otherwise it could happen that we try to apply a join result for a
198
+ // view whose DOM node was already removed
199
+ // See https://github.com/phoenixframework/phoenix_live_view/issues/4177.
200
+ this.el.setAttribute(PHX_ROOT_ID, this.root.id);
196
201
  this.ref = 0;
197
202
  this.lastAckRef = null;
198
203
  this.childJoins = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phoenix_live_view",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "description": "The Phoenix LiveView JavaScript client.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4189,6 +4189,7 @@ var View = class _View {
4189
4189
  }
4190
4190
  dom_default.putPrivate(this.el, "view", this);
4191
4191
  this.id = this.el.id;
4192
+ this.el.setAttribute(PHX_ROOT_ID, this.root.id);
4192
4193
  this.ref = 0;
4193
4194
  this.lastAckRef = null;
4194
4195
  this.childJoins = 0;
@@ -5934,7 +5935,7 @@ var LiveSocket = class {
5934
5935
  }
5935
5936
  // public
5936
5937
  version() {
5937
- return "1.1.27";
5938
+ return "1.1.28";
5938
5939
  }
5939
5940
  isProfileEnabled() {
5940
5941
  return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";