phoenix_live_view 1.1.21 → 1.1.23
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.
- package/assets/js/phoenix_live_view/dom_patch.js +3 -1
- package/assets/js/phoenix_live_view/index.ts +4 -0
- package/assets/js/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/priv/static/phoenix_live_view.cjs.js +2 -2
- package/priv/static/phoenix_live_view.cjs.js.map +2 -2
- package/priv/static/phoenix_live_view.esm.js +2 -2
- package/priv/static/phoenix_live_view.esm.js.map +2 -2
- package/priv/static/phoenix_live_view.js +2 -2
- package/priv/static/phoenix_live_view.min.js +2 -2
|
@@ -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
|
-
|
|
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
|
|
@@ -313,6 +313,10 @@ const LiveSocket = OriginalLiveSocket as unknown as LiveSocketConstructor;
|
|
|
313
313
|
* which is triggered after the element has been added to the DOM. If you try
|
|
314
314
|
* to call `createHook` from the constructor, an error will be logged.
|
|
315
315
|
*
|
|
316
|
+
* Furthermore, you can only start using the hook's APIs after the `mounted`
|
|
317
|
+
* callback of the hook has been called. If you try to call them earlier,
|
|
318
|
+
* an error will be logged.
|
|
319
|
+
*
|
|
316
320
|
* @example
|
|
317
321
|
*
|
|
318
322
|
* class MyComponent extends HTMLElement {
|
|
@@ -294,6 +294,10 @@ declare const LiveSocket: LiveSocketConstructor;
|
|
|
294
294
|
* which is triggered after the element has been added to the DOM. If you try
|
|
295
295
|
* to call `createHook` from the constructor, an error will be logged.
|
|
296
296
|
*
|
|
297
|
+
* Furthermore, you can only start using the hook's APIs after the `mounted`
|
|
298
|
+
* callback of the hook has been called. If you try to call them earlier,
|
|
299
|
+
* an error will be logged.
|
|
300
|
+
*
|
|
297
301
|
* @example
|
|
298
302
|
*
|
|
299
303
|
* class MyComponent extends HTMLElement {
|
package/package.json
CHANGED
|
@@ -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.
|
|
5927
|
+
return "1.1.23";
|
|
5928
5928
|
}
|
|
5929
5929
|
isProfileEnabled() {
|
|
5930
5930
|
return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true";
|