phoenix_live_view 1.1.21 → 1.1.22

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.
@@ -96,7 +96,9 @@ export default class DOMPatch {
96
96
  // https://github.com/phoenixframework/phoenix_live_view/pull/3942
97
97
  // we need to ensure that no parent is locked
98
98
  const closestLock = targetContainer.closest(`[${PHX_REF_LOCK}]`);
99
- if (closestLock) {
99
+ // If the targetContainer itself is locked, that's okay.
100
+ // https://github.com/phoenixframework/phoenix_live_view/issues/4088
101
+ if (closestLock && !closestLock.isSameNode(targetContainer)) {
100
102
  const clonedTree = DOM.private(closestLock, PHX_REF_LOCK);
101
103
  if (clonedTree) {
102
104
  // if a parent is locked with a cloned tree, we need to patch the cloned tree instead
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phoenix_live_view",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "The Phoenix LiveView JavaScript client.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2297,7 +2297,7 @@ var DOMPatch = class {
2297
2297
  }
2298
2298
  if (this.isCIDPatch()) {
2299
2299
  const closestLock = targetContainer.closest(`[${PHX_REF_LOCK}]`);
2300
- if (closestLock) {
2300
+ if (closestLock && !closestLock.isSameNode(targetContainer)) {
2301
2301
  const clonedTree = dom_default.private(closestLock, PHX_REF_LOCK);
2302
2302
  if (clonedTree) {
2303
2303
  targetContainer = clonedTree.querySelector(
@@ -5924,7 +5924,7 @@ var LiveSocket = class {
5924
5924
  }
5925
5925
  // public
5926
5926
  version() {
5927
- return "1.1.21";
5927
+ return "1.1.22";
5928
5928
  }
5929
5929
  isProfileEnabled() {
5930
5930
  return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";