diff --git a/app/javascript/new_design/messagerie.js b/app/javascript/new_design/messagerie.js index 0a3e01b39..6f1a010da 100644 --- a/app/javascript/new_design/messagerie.js +++ b/app/javascript/new_design/messagerie.js @@ -54,5 +54,5 @@ function saveMessageContent() { } } -addEventListener('ds:page:update', scrollMessagerie); -addEventListener('ds:page:update', saveMessageContent); +addEventListener('DOMContentLoaded', scrollMessagerie); +addEventListener('DOMContentLoaded', saveMessageContent); diff --git a/app/javascript/new_design/procedure-context.js b/app/javascript/new_design/procedure-context.js index 4ec90a6f2..753811c76 100644 --- a/app/javascript/new_design/procedure-context.js +++ b/app/javascript/new_design/procedure-context.js @@ -14,7 +14,7 @@ function expandProcedureDescription() { descBody.classList.remove('read-more-collapsed'); } -addEventListener('ds:page:update', updateReadMoreVisibility); +addEventListener('DOMContentLoaded', updateReadMoreVisibility); addEventListener('resize', updateReadMoreVisibility); delegate('click', '.read-more-button', expandProcedureDescription); diff --git a/app/javascript/new_design/support.js b/app/javascript/new_design/support.js index 8c590ae00..923f8417e 100644 --- a/app/javascript/new_design/support.js +++ b/app/javascript/new_design/support.js @@ -101,7 +101,7 @@ class ButtonExpand { if (document.querySelector('#contact-form')) { window.addEventListener( - 'ds:page:update', + 'DOMContentLoaded', function () { var buttons = document.querySelectorAll( 'button[aria-expanded][aria-controls], button.button-without-hint' diff --git a/app/javascript/shared/franceconnect.js b/app/javascript/shared/franceconnect.js index 748121209..c739002d0 100644 --- a/app/javascript/shared/franceconnect.js +++ b/app/javascript/shared/franceconnect.js @@ -20,7 +20,7 @@ function init() { } } -addEventListener('ds:page:update', init); +addEventListener('DOMContentLoaded', init); function toggleElement(event) { event.preventDefault();