Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions assets/js/phoenix_live_view/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1350,10 +1350,11 @@ export default class View {
const disableText = el.getAttribute(disableWith);
if (disableText !== null) {
if (!el.getAttribute(PHX_DISABLE_WITH_RESTORE)) {
el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText);
el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.textContent);
// Replaced innerText with textContent to prevent changing HTML element
}
if (disableText !== "") {
el.innerText = disableText;
el.textContent = disableText;
}
// PHX_DISABLED could have already been set in disableForm
el.setAttribute(
Expand Down
4 changes: 2 additions & 2 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.

4 changes: 2 additions & 2 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.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -5071,10 +5071,10 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
const disableText = el.getAttribute(disableWith);
if (disableText !== null) {
if (!el.getAttribute(PHX_DISABLE_WITH_RESTORE)) {
el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText);
el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.textContent);
}
if (disableText !== "") {
el.innerText = disableText;
el.textContent = disableText;
}
el.setAttribute(
PHX_DISABLED,
Expand Down
2 changes: 1 addition & 1 deletion priv/static/phoenix_live_view.min.js

Large diffs are not rendered by default.