fix: kanban not loading on refresh + modal horizontal scroll + lt-kv-row CSS
Kanban restore bug: - set-view-mode click handler called populateKanbanCards() directly but never called setViewMode(), so ticketViewMode was never saved to localStorage - DOMContentLoaded restore checked ticketViewMode (never written) — it should check lt_activeTab_<path> which lt.tabs.init() actually saves - Fix: delegate to setViewMode() from the click handler; DOMContentLoaded reads lt_activeTab_<path> and calls populateKanbanCards() when tab-kanban Settings modal horizontal scroll: - .lt-modal-body was missing overflow-x: hidden; content wider than the modal (e.g. kbd elements with white-space: nowrap) caused horizontal scrollbar - Added overflow-x: hidden + min-width: 0 to .lt-modal-body Missing lt-kv-row / lt-kv-label / lt-kv-value CSS: - These classes were used in TicketView, DashboardView, admin views but had no primary CSS rules (only a light-theme color override existed) - Without rules, lt-kv-row divs were block-level grid children consuming one grid cell each, making lt-kv-label/value stack inside wrong columns - Added display:contents on lt-kv-row so children participate directly in the lt-kv-grid 2-column grid; lt-kv-label/value get padding, border, and min-width:0 + overflow-wrap:break-word to prevent grid column blowout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -191,7 +191,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
break;
|
||||
// View mode toggle
|
||||
case 'set-view-mode':
|
||||
if (target.dataset.mode === 'card') populateKanbanCards();
|
||||
setViewMode(target.dataset.mode);
|
||||
break;
|
||||
// Settings
|
||||
case 'open-settings':
|
||||
@@ -1245,14 +1245,15 @@ function populateKanbanCards() {
|
||||
}
|
||||
}
|
||||
|
||||
// Restore view mode on page load — click the kanban tab button to trigger lt.tabs
|
||||
// Restore view mode on page load — lt.tabs already restores the active panel visually
|
||||
// via lt_activeTab_<path>; we just need to populate kanban cards if that panel is active
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const savedMode = localStorage.getItem('ticketViewMode');
|
||||
if (savedMode === 'card') {
|
||||
const cardBtn = document.getElementById('cardViewBtn');
|
||||
if (cardBtn) cardBtn.click();
|
||||
else populateKanbanCards();
|
||||
}
|
||||
try {
|
||||
const savedTab = localStorage.getItem('lt_activeTab_' + location.pathname);
|
||||
if (savedTab === 'tab-kanban') {
|
||||
populateKanbanCards();
|
||||
}
|
||||
} catch (_) {}
|
||||
});
|
||||
|
||||
// ========================================
|
||||
|
||||
Reference in New Issue
Block a user