Skip to content

Commit f8922e3

Browse files
SteffenDEgithub-actions[bot]
authored andcommitted
Update assets
1 parent 85d74d8 commit f8922e3

File tree

6 files changed

+49
-19
lines changed

6 files changed

+49
-19
lines changed

priv/static/phoenix_live_view.cjs.js

Lines changed: 13 additions & 3 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: 13 additions & 3 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: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4939,14 +4939,17 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
49394939
`failed mount with ${resp.status}. Falling back to page reload`,
49404940
resp
49414941
]);
4942-
this.onRedirect({ to: this.root.href, reloadToken: resp.token });
4942+
this.onRedirect({
4943+
to: this.liveSocket.main.href,
4944+
reloadToken: resp.token
4945+
});
49434946
return;
49444947
} else if (resp.reason === "unauthorized" || resp.reason === "stale") {
49454948
this.log("error", () => [
49464949
"unauthorized live_redirect. Falling back to page request",
49474950
resp
49484951
]);
4949-
this.onRedirect({ to: this.root.href, flash: this.flash });
4952+
this.onRedirect({ to: this.liveSocket.main.href, flash: this.flash });
49504953
return;
49514954
}
49524955
if (resp.redirect || resp.live_redirect) {
@@ -6224,6 +6227,9 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
62246227
if (viewEl) {
62256228
view = this.getViewByEl(viewEl);
62266229
} else {
6230+
if (!childEl.isConnected) {
6231+
return null;
6232+
}
62276233
view = this.main;
62286234
}
62296235
return view && callback ? callback(view) : view;
@@ -6496,7 +6502,11 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
64966502
dispatchClickAway(e, clickStartedAt) {
64976503
const phxClickAway = this.binding("click-away");
64986504
dom_default.all(document, `[${phxClickAway}]`, (el) => {
6499-
if (!(el.isSameNode(clickStartedAt) || el.contains(clickStartedAt))) {
6505+
if (!(el.isSameNode(clickStartedAt) || el.contains(clickStartedAt) || // When clicking a link with custom method,
6506+
// phoenix_html triggers a click on a submit button
6507+
// of a hidden form appended to the body. For such cases
6508+
// where the clicked target is hidden, we skip click-away.
6509+
!js_default.isVisible(clickStartedAt))) {
65006510
this.withinOwners(el, (view) => {
65016511
const phxEvent = el.getAttribute(phxClickAway);
65026512
if (js_default.isVisible(el) && js_default.isInViewport(el)) {

priv/static/phoenix_live_view.min.js

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

0 commit comments

Comments
 (0)