Skip to content

Commit f11e2ec

Browse files
SteffenDEgithub-actions[bot]
authored andcommitted
Update assets
1 parent 5384eb7 commit f11e2ec

File tree

6 files changed

+65
-29
lines changed

6 files changed

+65
-29
lines changed

priv/static/phoenix_live_view.cjs.js

Lines changed: 19 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix_live_view.cjs.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix_live_view.esm.js

Lines changed: 19 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix_live_view.esm.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix_live_view.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,7 +2791,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
27912791
let pushOpts = { loading, value, target, page_loading: !!page_loading };
27922792
let targetSrc = eventType === "change" && dispatcher ? dispatcher : sourceEl;
27932793
let phxTarget = target || targetSrc.getAttribute(view.binding("target")) || targetSrc;
2794-
view.withinTargets(phxTarget, (targetView, targetCtx) => {
2794+
const handler = (targetView, targetCtx) => {
27952795
if (!targetView.isConnected()) {
27962796
return;
27972797
}
@@ -2808,7 +2808,12 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
28082808
} else {
28092809
targetView.pushEvent(eventType, sourceEl, targetCtx, event || phxEvent, data, pushOpts, callback);
28102810
}
2811-
});
2811+
};
2812+
if (args.targetView && args.targetCtx) {
2813+
handler(args.targetView, args.targetCtx);
2814+
} else {
2815+
view.withinTargets(phxTarget, handler);
2816+
}
28122817
},
28132818
exec_navigate(e, eventType, phxEvent, view, sourceEl, el, { href, replace }) {
28142819
view.liveSocket.historyRedirect(e, href, replace ? "replace" : "push", null, sourceEl);
@@ -4621,12 +4626,19 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
46214626
this.withinTargets(phxTarget, (targetView, targetCtx) => {
46224627
const cid = this.targetComponentID(newForm, targetCtx);
46234628
pending++;
4624-
targetView.pushInput(input, targetCtx, cid, phxEvent, { _target: input.name }, () => {
4625-
pending--;
4626-
if (pending === 0) {
4627-
callback();
4629+
let e = new CustomEvent("phx:form-recovery", { detail: { sourceElement: oldForm } });
4630+
js_default.exec(e, "change", phxEvent, this, input, ["push", {
4631+
_target: input.name,
4632+
targetView,
4633+
targetCtx,
4634+
newCid: cid,
4635+
callback: () => {
4636+
pending--;
4637+
if (pending === 0) {
4638+
callback();
4639+
}
46284640
}
4629-
});
4641+
}]);
46304642
}, templateDom, templateDom);
46314643
}
46324644
pushLinkPatch(e, href, targetEl, callback) {

priv/static/phoenix_live_view.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)