diff --git a/app/javascript/controllers/application.js b/app/javascript/controllers/application.js index e703da5..437bb88 100644 --- a/app/javascript/controllers/application.js +++ b/app/javascript/controllers/application.js @@ -22,17 +22,17 @@ document.addEventListener("turbo:before-stream-render", function(event) { // Add a class to an element we are about to remove from the page // as defined by its "data-stream-exit-class" - var elementToRemove = document.getElementById(event.target.target) - if (elementToRemove) { - var streamExitClass = elementToRemove.dataset.streamExitClass - if (streamExitClass) { - // Intercept the removal of the element - event.preventDefault() - elementToRemove.classList.add(streamExitClass) - // Wait for its animation to end before removing the element - elementToRemove.addEventListener("animationend", function() { - event.target.performAction() - }) - } - } +// var elementToRemove = document.getElementById(event.target.target) +// if (elementToRemove) { +// var streamExitClass = elementToRemove.dataset.streamExitClass +// if (streamExitClass) { +// // Intercept the removal of the element +// event.preventDefault() +// elementToRemove.classList.add(streamExitClass) +// // Wait for its animation to end before removing the element +// elementToRemove.addEventListener("animationend", function() { +// event.target.performAction() +// }) +// } +// } })