Skip to content

Commit 13c6edd

Browse files
Ilan Parmentieramol2jcommerce
authored andcommitted
Update details.phtml
Good afternoon, I just encountered a problem with product's tabs in product info. I realized when description or other custom tabs have links, when you click on it, nothing happen. It caused by the script mage/tabs.js in details.phtml. The current link to trigger the tab is declared with data-role="switch" instead of a data-role="trigger". https://github.com/magento/magento2/blob/4f232511ceba6f1f7bf6f73b3b5609bd087f8c74/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml#L24-L37 When not even the trigger and the header is declared respectively by data-role="heading" and data-role="trigger", the script based it search on the current collapsible panel declared by data-role="collapsible". https://github.com/magento/magento2/blob/4f232511ceba6f1f7bf6f73b3b5609bd087f8c74/lib/web/mage/tabs.js#L99-L124 You can simply try by adding a link in the product description. Tell me if I am wrong. Cheers, Ilan PARMENTIER
1 parent 13b0fe9 commit 13c6edd

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
2626
<a class="data switch"
2727
tabindex="-1"
28-
data-toggle="switch"
28+
data-toggle="trigger"
2929
href="#<?= /* @escapeNotVerified */ $alias ?>"
3030
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
3131
<?= /* @escapeNotVerified */ $label ?>

0 commit comments

Comments
 (0)