fix: hide entire subtab container instead of just subtabs

Problem:
- When switching to a tab without subtabs, the subtab text was hidden
- But the container remained visible with border and took up space
- Invisible buttons were still clickable and could switch to previous subtabs
- Cursor changed to pointer over the invisible container

Solution:
- Changed logic to hide/show entire .sub-tab-container instead of individual .sub-tab elements
- Now container is completely removed from layout when not active
- Prevents phantom clicks and visual artifacts

Changed in custom_subtabs.js (lines 192, 194):
- Before: $(this).find(".sub-tab").show/hide()
- After: $(this).show/hide()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Ali 2026-01-12 18:29:20 +04:00
parent 2a97ca39bc
commit ff3924f0fd
1 changed files with 2 additions and 2 deletions

View File

@ -189,9 +189,9 @@ function setup_custom_subtabs(wrapper, currentDoctype) {
wrapper.find(".sub-tab-container").each(function() {
const containerParentId = $(this).attr("data-parent-id");
if (containerParentId === tabId) {
$(this).find(".sub-tab").show();
$(this).show();
} else {
$(this).find(".sub-tab").hide();
$(this).hide();
}
});
});