adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
733 stars 740 forks source link

Accordion Component working in author, publish environment but fails in dispatcher #1022

Closed ghost closed 4 years ago

ghost commented 4 years ago

Bug Report

Current Behavior we have enabled the core components and proxy the Accordion component on to the site. The Accordion works as expected in author and publish environment but fails in dispatcher. The accordion component rte field doesn't expand. There is no trace of errors either in dispatcher or console.log. Expected behavior/code The Accordion is working as expected in author and publisher and not working in dispatcher. we want the single and multi expansion of accordion to be working in dispatcher as-well Environment

ghost commented 4 years ago

this is for future reference if anyone comes with the same issue: we removed this : if (document.readyState !== "loading") { onDocumentReady(); } else { document.addEventListener("DOMContentLoaded", onDocumentReady); } and added this to the OOTB OOTB did not work // if (document.readyState !== "loading") { // onDocumentReady(); // } else { // document.addEventListener("DOMContentLoaded", onDocumentReady); // }

window.addEventListener('load', function () {
    onDocumentReady();

});