diff --git a/internal/lkgateway/web/templates/admin_setup.html b/internal/lkgateway/web/templates/admin_setup.html index 8402425..485ad89 100644 --- a/internal/lkgateway/web/templates/admin_setup.html +++ b/internal/lkgateway/web/templates/admin_setup.html @@ -1176,7 +1176,8 @@ try { sessionStorage.setItem('bj-setup-tab', id); } catch(e) {} try { history.replaceState(null, '', '#' + id); } catch(e) {} } - navs.forEach(function(b){ b.addEventListener('click', function(){ show(b.dataset.sec); }); }); + // выбрали другой раздел — с его начала, а не с той же высоты, где листали прежний + navs.forEach(function(b){ b.addEventListener('click', function(){ var same=b.classList.contains('active'); show(b.dataset.sec); if(!same) window.scrollTo(0,0); }); }); var h = (location.hash || '').replace('#',''); // Хэш в URL имеет приоритет. Иначе — после сохранения (есть ?flash/?scrollto) // восстанавливаем последнюю вкладку из sessionStorage. diff --git a/internal/lkgateway/web/templates/layout.html b/internal/lkgateway/web/templates/layout.html index aa8a2b4..4f88fc7 100644 --- a/internal/lkgateway/web/templates/layout.html +++ b/internal/lkgateway/web/templates/layout.html @@ -47,6 +47,8 @@ .num, .stat-value, .clock, td .id, .mono { font-variant-numeric:tabular-nums; } * { box-sizing: border-box; } html, body { margin:0; padding:0; } +/* место под полосу прокрутки — всегда: короткий и длинный раздел не сдвигают страницу вбок */ +html { scrollbar-gutter:stable; } body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; @@ -258,7 +260,7 @@ label { font-size:13px; font-weight:500; } .settings-section, .settings-section .card { min-width:0; } .settings-section table { max-width:100%; } .tw { overflow-x:auto; max-width:100%; } -.settings-nav { position:sticky; top:78px; display:flex; flex-direction:column; gap:2px; } +.settings-nav { position:sticky; top:78px; display:flex; flex-direction:column; gap:2px; max-height:calc(100vh - 96px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; } .settings-nav button { display:flex; align-items:center; gap:11px; justify-content:flex-start; background:transparent; border:1px solid transparent; color:var(--text-2); @@ -409,7 +411,7 @@ label { font-size:13px; font-weight:500; } @media (max-width:700px){.org-grid{grid-template-columns:minmax(0,1fr)}} @media (max-width:820px) { .settings { grid-template-columns:1fr; } - .settings-nav { flex-direction:row; overflow-x:auto; position:static; padding-bottom:8px; } + .settings-nav { flex-direction:row; overflow-x:auto; position:static; padding-bottom:8px; max-height:none; overflow-y:visible; } .settings-nav button { white-space:nowrap; width:auto; } }