Skip to content

Commit

Permalink
Fix phx-disable-with not restoring disabled state on non-diff ack. Cl…
Browse files Browse the repository at this point in the history
…oses #2993
  • Loading branch information
chrismccord committed Jan 17, 2024
1 parent 82a4df9 commit a36861b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions assets/js/phoenix_live_view/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ export default class View {
el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText)
}
if(disableText !== ""){ el.innerText = disableText }
el.setAttribute(PHX_DISABLED, el.disabled)
el.setAttribute("disabled", "")
}
})
Expand Down
1 change: 1 addition & 0 deletions priv/static/phoenix_live_view.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.cjs.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions priv/static/phoenix_live_view.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.esm.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions priv/static/phoenix_live_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3455,6 +3455,7 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
if (disableText !== "") {
el.innerText = disableText;
}
el.setAttribute(PHX_DISABLED, el.disabled);
el.setAttribute("disabled", "");
}
});
Expand Down
8 changes: 4 additions & 4 deletions priv/static/phoenix_live_view.min.js

Large diffs are not rendered by default.

0 comments on commit a36861b

Please sign in to comment.