From c55a7cd2e2fa59457304eecaf8d834e46fd539fe Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Thu, 5 Jul 2018 10:14:41 -0400 Subject: [PATCH] Target only immediate children when determining if a tab should be hidden Fixes #3627. This changes the logic for hiding tabs when all of their fields are hidden to specifically only target direct children of the tab pane when looking for visible fields because repeaters will have fields present that are only hidden by virtue of the parent field being hidden however the previous behaviour would consider it visible. --- modules/backend/widgets/form/assets/js/october.form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/widgets/form/assets/js/october.form.js b/modules/backend/widgets/form/assets/js/october.form.js index e33f848df..0936d2df3 100644 --- a/modules/backend/widgets/form/assets/js/october.form.js +++ b/modules/backend/widgets/form/assets/js/october.form.js @@ -187,7 +187,7 @@ $('.tab-pane', tabControl).each(function() { $('[data-target="#' + $(this).attr('id') + '"]', tabControl) .closest('li') - .toggle(!!$('.form-group:not(:empty):not(.hide)', $(this)).length) + .toggle(!!$('> .form-group:not(:empty):not(.hide)', $(this)).length) }) /*