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
747 stars 753 forks source link

Panel Selector for Accordion/Tabs/Carousel missing when page loaded first in Preview #2833

Open HitmanInWis opened 3 months ago

HitmanInWis commented 3 months ago

Bug Present as of Version: 2.25.5-SNAPSHOT

If the page editor is first loaded in Preview mode and then switched to Edit mode the Panel Selector icon in the component toolbar does not show for Accordion, Carousel, and Tabs components. The author must refresh the entire page (in Edit mode) to restore the Panel Selector icon in the toolbar.

This is b/c the HTL code in the .html files for Accordion/Carousel/Tabs only sets the data-panelcontainer value if wcmmode.edit which is only true if the page is loaded in Edit mode. Swapping from Preview mode to Edit mode does not refresh the page, and thus does not re-run the HTML.

Example from tabs.html:

data-panelcontainer="${wcmmode.edit && 'tabs'}"

should be updated to

data-panelcontainer="${!wcmmode.disabled && 'tabs'}"

This update should be made in all 3 components.

Special Note: This issue is NOT reproducible in the WCM Core Brand Library of Core Components Examples, b/c the wrapping Demo component forces the wcmmode of the displayed child components to Edit, thus masking the bug.