Skip to content

Commit bbc1c11

Browse files
Eranclaude
andcommitted
fix: force tab panel visibility via inline style + !important CSS
Blank space on Scheduled/Settings tabs was caused by hidden tab panels not being fully suppressed. Now switchTab() sets style.display directly on every panel (bypasses any CSS specificity conflicts with Tailwind CDN) and the CSS rule uses !important as a secondary guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8c40b16 commit bbc1c11

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

index.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
.sidebar-btn { transition: all .15s ease; }
1313
.sidebar-btn.active { background: #25D366; color: white; }
1414
.sidebar-btn:not(.active):hover { background: #f0fdf4; color: #15803d; }
15-
.tab-panel { display: none; }
16-
.tab-panel.active { display: block; }
15+
.tab-panel { display: none !important; }
16+
.tab-panel.active { display: block !important; }
1717
textarea, input, select { transition: border-color .15s; }
1818
textarea:focus, input:focus, select:focus { outline: none; border-color: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,.15); }
1919
.chip-box input:focus { border-color: transparent !important; box-shadow: none !important; }
@@ -1742,9 +1742,15 @@ <h3 class="text-sm font-semibold text-gray-800">Privacy Settings</h3>
17421742
}
17431743

17441744
function switchTab(name, btn) {
1745-
document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
1745+
// Explicitly hide ALL panels via inline style (bypasses any CSS specificity issues)
1746+
document.querySelectorAll('.tab-panel').forEach(p => {
1747+
p.classList.remove('active');
1748+
p.style.display = 'none';
1749+
});
17461750
document.querySelectorAll('.sidebar-btn').forEach(b => { b.classList.remove('active'); b.classList.add('text-gray-600'); });
1747-
document.getElementById(`tab-${name}`).classList.add('active');
1751+
const target = document.getElementById(`tab-${name}`);
1752+
target.classList.add('active');
1753+
target.style.display = 'block';
17481754
btn.classList.add('active');
17491755
btn.classList.remove('text-gray-600');
17501756
clearResponse();
@@ -1753,8 +1759,8 @@ <h3 class="text-sm font-semibold text-gray-800">Privacy Settings</h3>
17531759
if (scrollArea) scrollArea.scrollTop = 0;
17541760
// Hide the response panel for tabs that don't make direct API calls
17551761
const noResponsePanel = ['scheduled', 'settings'];
1756-
const panel = document.querySelector('main > div.border-t');
1757-
if (panel) panel.style.display = noResponsePanel.includes(name) ? 'none' : '';
1762+
const respPanel = document.querySelector('main > div.border-t');
1763+
if (respPanel) respPanel.style.display = noResponsePanel.includes(name) ? 'none' : '';
17581764
}
17591765

17601766
function toggleDelay(prefix) {

0 commit comments

Comments
 (0)