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:
parent
2a97ca39bc
commit
ff3924f0fd
|
|
@ -189,9 +189,9 @@ function setup_custom_subtabs(wrapper, currentDoctype) {
|
||||||
wrapper.find(".sub-tab-container").each(function() {
|
wrapper.find(".sub-tab-container").each(function() {
|
||||||
const containerParentId = $(this).attr("data-parent-id");
|
const containerParentId = $(this).attr("data-parent-id");
|
||||||
if (containerParentId === tabId) {
|
if (containerParentId === tabId) {
|
||||||
$(this).find(".sub-tab").show();
|
$(this).show();
|
||||||
} else {
|
} else {
|
||||||
$(this).find(".sub-tab").hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue