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
726 stars 735 forks source link

[Accordion] Having an accordion on the page removes unrelated anchors / hashes from links #2650

Open royteeuwen opened 6 months ago

royteeuwen commented 6 months ago

Bug Report

Current Behavior We use an Accordion on the page, which has the capability to use hashes to save the state of the accordion. But there are also other uses cases for a hash, for example to scroll to a title on the page (using the ID property).

The following code breaks all hashes: https://github.com/adobe/aem-core-wcm-components/blob/5caec6000e2ed5cfd0feddae28da14386309f8fd/content/src/content/jcr_root/apps/core/wcm/components/accordion/v1/accordion/clientlibs/site/js/accordion.js#L389

Expected behavior/code The hash should not be removed when loading the page, this breaks key functionality

Environment