Skip to content

Commit

Permalink
Merge branch 'apply_feedback_permanently' into apply_feedback_permane…
Browse files Browse the repository at this point in the history
…ntly_assets
  • Loading branch information
SteffenDE committed Feb 5, 2024
2 parents a0fc88f + f2c3830 commit 93008bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/js/phoenix_live_view/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ let DOM = {
// when a container is updated
const feedbackResults = {}
feedbackContainers.forEach(el => {
// skip elements that are not in the DOM;
// this is needed because we push both fromEl and toEl in onBeforeElUpdated
// and it can happen that phx-feedback-for is removed from the toEl
if(!container.contains(el)) return
const feedback = el.getAttribute(phxFeedbackFor)
if(feedbackResults[feedback] === true){
this.hideFeedback(el)
Expand Down

0 comments on commit 93008bd

Please sign in to comment.