diff --git a/client/src/entrypoints/admin/comments.js b/client/src/entrypoints/admin/comments.js index dc95019787..ae4e15a893 100644 --- a/client/src/entrypoints/admin/comments.js +++ b/client/src/entrypoints/admin/comments.js @@ -260,7 +260,7 @@ window.comments = (() => { formElement.querySelectorAll('[data-component="add-comment-button"]').forEach(initAddCommentButton); // Attach the commenting app to the tab navigation, if it exists - const tabNavElement = formElement.querySelector('.tab-nav'); + const tabNavElement = formElement.querySelector('[data-tab-nav]'); if (tabNavElement) { commentApp.setCurrentTab(tabNavElement.dataset.currentTab); tabNavElement.addEventListener('switch', (e) => { diff --git a/wagtail/admin/templates/wagtailadmin/edit_handlers/tabbed_interface.html b/wagtail/admin/templates/wagtailadmin/edit_handlers/tabbed_interface.html index 1240418fe7..fce439e554 100644 --- a/wagtail/admin/templates/wagtailadmin/edit_handlers/tabbed_interface.html +++ b/wagtail/admin/templates/wagtailadmin/edit_handlers/tabbed_interface.html @@ -1,14 +1,15 @@ {% load wagtailadmin_tags i18n %} -