Skip to content

Commit

Permalink
maybe fix #1609 (#2974)
Browse files Browse the repository at this point in the history
Co-authored-by: Steffen Deusch <steffen.deusch@teaminternet.com>
  • Loading branch information
SteffenDE and Steffen Deusch committed Jan 1, 2024
1 parent 474e3c6 commit 52a897f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/phoenix_live_view/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ let DOM = {
for(let i = targetAttrs.length - 1; i >= 0; i--){
let name = targetAttrs[i].name
if(isIgnored){
if(name.startsWith("data-") && !source.hasAttribute(name)){ target.removeAttribute(name) }
if(name.startsWith("data-") && !source.hasAttribute(name) && ![PHX_REF, PHX_REF_SRC].includes(name)){ target.removeAttribute(name) }
} else {
if(!source.hasAttribute(name)){ target.removeAttribute(name) }
}
Expand Down
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 @@ -923,6 +923,7 @@ export default class View {
this.uploadFiles(inputEl.form, targetCtx, ref, cid, (_uploads) => {
callback && callback(resp)
this.triggerAwaitingSubmit(inputEl.form)
this.undoRefs(ref)
})
}
} else {
Expand Down

0 comments on commit 52a897f

Please sign in to comment.