fix: Scrollposition breiter Tabellen bleibt bei der Aktualisierung, Knopfspalte rechts fest; Version 0.1.15-rc3

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 15:59:29 +01:00
parent 7f904634b6
commit 5518ccaa99
5 changed files with 24 additions and 10 deletions

View File

@ -1103,7 +1103,12 @@ document.querySelectorAll("[data-refresh]").forEach(function (el) {
if (r.status === 401) { window.location.href = "/ui/login"; return null; }
return r.ok ? r.text() : null;
}).then(function (text) {
if (text !== null && text !== undefined) { el.innerHTML = text; }
if (text === null || text === undefined || text === el._letzterInhalt) { return; }
// Die Scrollposition breiter Tabellen merken: Das Ersetzen würde sie sonst alle paar Sekunden zurücksetzen.
var breit = Array.prototype.map.call(el.querySelectorAll(".breit"), function (b) { return b.scrollLeft; });
el.innerHTML = text;
el._letzterInhalt = text;
el.querySelectorAll(".breit").forEach(function (b, i) { if (breit[i]) { b.scrollLeft = breit[i]; } });
}).catch(function () {});
}, ms);
});
@ -1184,7 +1189,7 @@ td.zeit{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);
select,textarea{font:inherit;padding:.5rem .65rem;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);min-width:0}
textarea{width:100%;resize:vertical}select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:-1px}
button:disabled{opacity:.5;cursor:not-allowed}button.danger:hover{border-color:var(--danger);color:var(--danger)}
td.aktionen{white-space:nowrap}td.aktionen form{display:inline-block;margin:0 .15rem 0 0}
td.aktionen{white-space:nowrap}td.aktionen{position:sticky;right:0;background:var(--surface);box-shadow:-.6rem 0 .6rem -.6rem rgba(0,0,0,.35)}td.aktionen form{display:inline-block;margin:0 .15rem 0 0}
.formular{display:grid;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr));gap:.8rem 1rem;align-items:end}
.formular label{display:flex;flex-direction:column;gap:.25rem;font-size:.85rem;color:var(--muted)}
.formular .haken{flex-direction:row;align-items:center;gap:.45rem;color:var(--text)}.formular input[type=checkbox]{width:1.05rem;height:1.05rem;accent-color:var(--accent)}

View File

@ -1651,6 +1651,15 @@ async fn modellseite_hat_reiter_mit_aktivem_zustand_und_kein_status_text_bei_den
);
}
#[tokio::test]
async fn auto_aktualisierung_behaelt_die_scrollposition_breiter_tabellen() {
// Ohne das sprang die Tabelle alle paar Sekunden an den Anfang, die Knöpfe rechts waren nicht bedienbar.
let gw = gateway(0, false).await;
let (cookie, _) = ui_session(&gw, &gw.key_admin).await;
let (_, _, js) = ui_get(&gw, "/ui/app.js", Some(&cookie)).await;
assert!(js.contains("scrollLeft") && js.contains("_letzterInhalt"));
}
#[tokio::test]
async fn chat_denkstufe_nur_bei_bestaetigtem_modell_sichtbar() {
// #1157: Die Denkstufe steht je Modell als Angabe in der Auswahl; das Skript blendet sie sonst aus.